Index: ossp-pkg/sio/sio_hello.c RCS File: /v/ossp/cvs/ossp-pkg/sio/sio_hello.c,v rcsdiff -q -kk '-r1.11' '-r1.12' -u '/v/ossp/cvs/ossp-pkg/sio/sio_hello.c,v' 2>/dev/null --- sio_hello.c 2002/11/29 13:00:18 1.11 +++ sio_hello.c 2002/11/29 14:27:44 1.12 @@ -246,7 +246,7 @@ #define GOTO(s, c) do { my->state = (s); rc = (c); } while(0) static -sio_rc_t hello_protocol(sio_t *sio, private_t *my, int isoutput) +sio_rc_t hello_protocol(sio_t *sio, private_t *my, int isoutput, sio_rc_t orc) { sio_rc_t rc = SIO_ERR_INT; int good; @@ -255,6 +255,8 @@ case INIT: + assert(orc == SIO_SCHED_UP); + /* * save origin (input, output) so that * we can complete correctly after handshake @@ -280,6 +282,8 @@ case PROMPTING: + assert(orc == SIO_SCHED_CROSS || orc == SIO_SCHED_LOOP); + assert(isoutput == 1); /* * only called on output stream @@ -297,6 +301,8 @@ case PROMPTED: + assert(orc == SIO_SCHED_DOWN); + assert(isoutput == 1); /* * only called on output stream @@ -313,6 +319,8 @@ case WAIT: + assert(orc == SIO_SCHED_CROSS || orc == SIO_SCHED_DOWN); + assert(isoutput == 0); /* * only called on input stream @@ -393,13 +401,13 @@ static sio_rc_t hello_input(sio_t *sio, al_t *al, void *u, sio_rc_t orc) { - return hello_protocol(sio, (private_t *)u, 0); + return hello_protocol(sio, (private_t *)u, 0, orc); } static sio_rc_t hello_output(sio_t *sio, al_t *al, void *u, sio_rc_t orc) { - return hello_protocol(sio, (private_t *)u, 1); + return hello_protocol(sio, (private_t *)u, 1, orc); } sio_module_t sio_module_hello = {