In the client event handler we have to set the eof variable
to a negative value in order to shut down the stdout task.
Rename eof to error while at it.
PARA_NOTICE_LOG("%s\n", PARA_STRERROR(-t->ret));
if (t->ret != -E_HANDSHAKE_COMPLETE) {
unregister_task(t);
- p->eof = 1;
+ p->error = t->ret;
return;
}
if (p->status == CL_SENDING) {
stdout_set_defaults(&sot);
sot.buf = p->buf;
sot.loaded = &p->loaded;
- sot.input_error = &p->eof;
+ sot.input_error = &p->error;
register_task(&sot.task);
}
/** the client task structure */
struct task task;
/** non-zero if task is unregistered */
- int eof;
+ int error;
/** the buffer used for handshake and receiving */
char buf[CLIENT_BUFSIZE];
/** number of bytes loaded in \p buf */