diff options
-rw-r--r-- | redir.c | 17 | ||||
-rw-r--r-- | redir.h | 3 |
2 files changed, 16 insertions, 4 deletions
@@ -369,7 +369,7 @@ int redir_sol_send(struct redir *r, unsigned char *buf, int blen) return rc; } -int redir_sol_recv(struct redir *r) +int redir_recv(struct redir *r) { unsigned char msg[64]; int count, len, bshift; @@ -500,7 +500,7 @@ repeat: case SOL_DATA_FROM_HOST: if (r->blen < 10) /* header length */ goto again; - bshift = redir_sol_recv(r); + bshift = redir_recv(r); if (bshift < 0) goto err; break; @@ -570,6 +570,19 @@ repeat: } redir_state(r, REDIR_RUN_IDER); break; + case IDER_DATA_FROM_HOST: + if (r->blen < 10) /* header length */ + goto again; + bshift = redir_recv(r); + if (bshift < 0) + goto err; + break; + case END_IDER_REDIRECTION_REPLY: + bshift = r->blen; /* FIXME */ + if (r->blen < bshift) + goto again; + redir_stop(r); + break; default: snprintf(r->err, sizeof(r->err), "%s: unknown r->buf 0x%02x", __FUNCTION__, r->buf[0]); @@ -61,12 +61,11 @@ int redir_connect(struct redir *r); int redir_start(struct redir *r); int redir_stop(struct redir *r); int redir_auth(struct redir *r); +int redir_recv(struct redir *r); int redir_sol_start(struct redir *r); int redir_sol_stop(struct redir *r); int redir_sol_send(struct redir *r, unsigned char *buf, int blen); -int redir_sol_recv(struct redir *r); int redir_ider_start(struct redir *r); int redir_ider_stop(struct redir *r); int redir_ider_send(struct redir *r, unsigned char *buf, int blen); -int redir_ider_recv(struct redir *r); int redir_data(struct redir *r); |