X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fzoom-c.c;h=da0d86743d0dac3c4f77e758f45053b514fb362a;hp=e7f25c29f4736629fcfc948048e615f59641bd37;hb=ce627148dbba2878565b8d9da33f6b25f33da4bd;hpb=f3fa080453f6e57618216f6e58d871fb06f0d1b6 diff --git a/src/zoom-c.c b/src/zoom-c.c index e7f25c2..da0d867 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -1563,6 +1563,7 @@ static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres) location, &host_change); if (do_connect_host(c, location) == zoom_complete) return; /* connect failed.. */ + cs_rcvconnect(c->cs); send_HTTP_redirect(c, location); return; } @@ -1960,7 +1961,7 @@ static void ZOOM_connection_do_io(ZOOM_connection c, int mask) if (c->cs->io_pending & CS_WANT_READ) mask += ZOOM_SELECT_READ; ZOOM_connection_set_mask(c, mask); - event = ZOOM_Event_create(ZOOM_EVENT_NONE); + event = ZOOM_Event_create(ZOOM_EVENT_CONNECT); ZOOM_connection_put_event(c, event); } else if (ret == 0) @@ -1973,9 +1974,11 @@ static void ZOOM_connection_do_io(ZOOM_connection c, int mask) else { /* no init request for SRW .. */ - assert(c->tasks->which == ZOOM_TASK_CONNECT); - ZOOM_connection_remove_task(c); - ZOOM_connection_set_mask(c, 0); + if (c->tasks->which == ZOOM_TASK_CONNECT) + { + ZOOM_connection_remove_task(c); + ZOOM_connection_set_mask(c, 0); + } ZOOM_connection_exec_task(c); } c->state = STATE_ESTABLISHED;