Changeset 657
Legend:
- Unmodified
- Added
- Removed
-
trunk/sx/error.c
r156 r657 84 84 /* stuff to write */ 85 85 s->want_write = 1; 86 87 _sx_event(s, event_WANT_WRITE, NULL); 86 88 } 87 89 -
trunk/sx/io.c
r620 r657 468 468 /* close the stream if necessary */ 469 469 if(s->state >= state_STREAM_SENT) { 470 _sx_debug(ZONE, "sending closing </stream:stream>"); 470 471 jqueue_push(s->wbufq, _sx_buffer_new("</stream:stream>", 16, NULL, NULL), 0); 471 472 s->want_write = 1; 472 } 473 474 _sx_state(s, state_CLOSING); 473 _sx_state(s, state_CLOSING); 474 _sx_event(s, event_WANT_WRITE, NULL); 475 } else 476 _sx_state(s, state_CLOSING); 475 477 } 476 478 -
trunk/sx/ssl.c
r644 r657 103 103 if(NAD_ENAME_L(nad, 0) == 8 && strncmp(NAD_ENAME(nad, 0), "starttls", 8) == 0) { 104 104 nad_free(nad); 105 105 106 106 /* can't go on if we've been here before */ 107 107 if(s->ssf > 0) { … … 255 255 _sx_close(s); 256 256 257 /* !!! drop queue */258 259 257 return -1; 260 258 } … … 272 270 sx_error_t sxe; 273 271 274 /* sanity*/272 /* do not encrypt when error */ 275 273 if(sc->last_state == SX_SSL_STATE_ERROR) 276 return -2;274 return 1; 277 275 278 276 _sx_debug(ZONE, "in _sx_ssl_wio"); … … 485 483 if(sc->last_state == SX_SSL_STATE_WANT_READ || sc->last_state == SX_SSL_STATE_NONE) 486 484 s->want_read = 1; 487 485 488 486 if(buf->len == 0) 489 487 return 0; … … 655 653 656 654 free(sc); 657 655 658 656 s->plugin_data[p->index] = NULL; 659 657 } … … 748 746 return 1; 749 747 } 750 748 751 749 /* Load the CA chain, if configured */ 752 750 if (cachain != NULL) {
