summaryrefslogtreecommitdiffstats
path: root/redir.c
diff options
context:
space:
mode:
Diffstat (limited to 'redir.c')
-rw-r--r--redir.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/redir.c b/redir.c
index 03e948a..bd54637 100644
--- a/redir.c
+++ b/redir.c
@@ -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]);