|
@@ -275,15 +275,9 @@ static void http_close ( struct http_transaction *http, int rc ) {
|
275
|
275
|
/* Stop timer */
|
276
|
276
|
stop_timer ( &http->timer );
|
277
|
277
|
|
278
|
|
- /* Close all interfaces, allowing for the fact that the
|
279
|
|
- * content-decoded and transfer-decoded interfaces may be
|
280
|
|
- * connected to the same object.
|
281
|
|
- */
|
282
|
|
- intf_shutdown ( &http->conn, rc );
|
283
|
|
- intf_nullify ( &http->transfer );
|
284
|
|
- intf_shutdown ( &http->content, rc );
|
285
|
|
- intf_shutdown ( &http->transfer, rc );
|
286
|
|
- intf_shutdown ( &http->xfer, rc );
|
|
278
|
+ /* Close all interfaces */
|
|
279
|
+ intfs_shutdown ( rc, &http->conn, &http->transfer, &http->content,
|
|
280
|
+ &http->xfer, NULL );
|
287
|
281
|
}
|
288
|
282
|
|
289
|
283
|
/**
|
|
@@ -784,12 +778,9 @@ static int http_transfer_complete ( struct http_transaction *http ) {
|
784
|
778
|
}
|
785
|
779
|
}
|
786
|
780
|
|
787
|
|
- /* Restart content decoding interfaces (which may be attached
|
788
|
|
- * to the same object).
|
789
|
|
- */
|
790
|
|
- intf_nullify ( &http->transfer ); /* avoid potential loops */
|
791
|
|
- intf_restart ( &http->content, http->response.rc );
|
792
|
|
- intf_restart ( &http->transfer, http->response.rc );
|
|
781
|
+ /* Restart content decoding interfaces */
|
|
782
|
+ intfs_restart ( http->response.rc, &http->content, &http->transfer,
|
|
783
|
+ NULL );
|
793
|
784
|
intf_plug_plug ( &http->transfer, &http->content );
|
794
|
785
|
http->len = 0;
|
795
|
786
|
assert ( http->remaining == 0 );
|