[xio-commit] CVS update: MODIFIED: http, globus_xio_http_client.c, globus_xio_http_server.c
Joe Bester
commit at globus.org
Tue Apr 29 14:50:28 CDT 2008
, globus_xio_http_transform.c
...
User: bester
Date: 08/04/29 14:50:27
Modified: src/builtins/http globus_i_xio_http.h
globus_xio_http_client.c globus_xio_http_handle.c
globus_xio_http_server.c
globus_xio_http_transform.c
Log:
Fix assertion failure in http driver when cancelling a write operation because
of a response read failure.
Revision Changes Path
1.13 +4 -0 xio/src/builtins/http/globus_i_xio_http.h
http://viewcvs.globus.org/viewcvs.cgi/xio/src/builtins/http/globus_i_xio_http.h.diff?r1=1.12&r2=1.13
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globus_i_xio_http.h
===================================================================
RCS file: /home/globdev/CVS/globus-packages/xio/src/builtins/http/globus_i_xio_http.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- globus_i_xio_http.h 1 Feb 2006 20:30:43 -0000 1.12
+++ globus_i_xio_http.h 29 Apr 2008 19:50:27 -0000 1.13
@@ -82,6 +82,10 @@
*/
globus_xio_operation_t operation;
/**
+ * Driver handle associated with the operation
+ */
+ globus_xio_driver_handle_t driver_handle;
+ /**
* Number of bytes copied into user buffers already (for residue handling
* in reads).
*/
1.17 +3 -1 xio/src/builtins/http/globus_xio_http_client.c
http://viewcvs.globus.org/viewcvs.cgi/xio/src/builtins/http/globus_xio_http_client.c.diff?r1=1.16&r2=1.17
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globus_xio_http_client.c
===================================================================
RCS file: /home/globdev/CVS/globus-packages/xio/src/builtins/http/globus_xio_http_client.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- globus_xio_http_client.c 8 Nov 2006 22:07:28 -0000 1.16
+++ globus_xio_http_client.c 29 Apr 2008 19:50:27 -0000 1.17
@@ -708,7 +708,7 @@
* has been registered should be cancelled.
*/
result = globus_xio_driver_operation_cancel(
- http_handle->handle,
+ http_handle->write_operation.driver_handle,
http_handle->write_operation.operation);
globus_assert(result == GLOBUS_SUCCESS);
}
@@ -796,6 +796,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
finish_read = GLOBUS_TRUE;
@@ -864,6 +865,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
finish_read = GLOBUS_TRUE;
1.9 +5 -0 xio/src/builtins/http/globus_xio_http_handle.c
http://viewcvs.globus.org/viewcvs.cgi/xio/src/builtins/http/globus_xio_http_handle.c.diff?r1=1.8&r2=1.9
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globus_xio_http_handle.c
===================================================================
RCS file: /home/globdev/CVS/globus-packages/xio/src/builtins/http/globus_xio_http_handle.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- globus_xio_http_handle.c 19 Jan 2006 05:57:40 -0000 1.8
+++ globus_xio_http_handle.c 29 Apr 2008 19:50:27 -0000 1.9
@@ -113,10 +113,12 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
http_handle->write_operation.iov = NULL;
http_handle->write_operation.iovcnt = 0;
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
http_handle->write_operation.nbytes = 0;
http_handle->user_close = GLOBUS_FALSE;
http_handle->read_response = GLOBUS_FALSE;
@@ -195,10 +197,12 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
http_handle->write_operation.iov = NULL;
http_handle->write_operation.iovcnt = 0;
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
http_handle->write_operation.nbytes = 0;
http_handle->user_close = GLOBUS_FALSE;
http_handle->read_response = GLOBUS_FALSE;
@@ -516,6 +520,7 @@
globus_xio_driver_operation_destroy(op);
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
if (http_handle->close_operation != NULL)
{
1.17 +5 -0 xio/src/builtins/http/globus_xio_http_server.c
http://viewcvs.globus.org/viewcvs.cgi/xio/src/builtins/http/globus_xio_http_server.c.diff?r1=1.16&r2=1.17
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globus_xio_http_server.c
===================================================================
RCS file: /home/globdev/CVS/globus-packages/xio/src/builtins/http/globus_xio_http_server.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- globus_xio_http_server.c 18 Aug 2007 00:13:40 -0000 1.16
+++ globus_xio_http_server.c 29 Apr 2008 19:50:27 -0000 1.17
@@ -456,6 +456,7 @@
}
free_headers_exit:
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
http_handle->write_operation.iov = NULL;
http_handle->write_operation.iovcnt = 0;
http_handle->write_operation.wait_for = 0;
@@ -550,6 +551,7 @@
{
globus_xio_driver_finished_write(op, result, 0);
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
}
}
else
@@ -558,6 +560,7 @@
globus_xio_driver_operation_destroy(
http_handle->write_operation.operation);
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
}
if (http_handle->close_operation != NULL)
@@ -842,6 +845,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
globus_mutex_unlock(&http_handle->mutex);
@@ -893,6 +897,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
globus_mutex_unlock(&http_handle->mutex);
1.19 +8 -2 xio/src/builtins/http/globus_xio_http_transform.c
http://viewcvs.globus.org/viewcvs.cgi/xio/src/builtins/http/globus_xio_http_transform.c.diff?r1=1.18&r2=1.19
(In the diff below, changes in quantity of whitespace are not shown.)
Index: globus_xio_http_transform.c
===================================================================
RCS file: /home/globdev/CVS/globus-packages/xio/src/builtins/http/globus_xio_http_transform.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- globus_xio_http_transform.c 1 Feb 2006 20:30:43 -0000 1.18
+++ globus_xio_http_transform.c 29 Apr 2008 19:50:27 -0000 1.19
@@ -482,6 +482,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
http_handle->read_operation.wait_for = 0;
free(http_handle->cancellation);
@@ -569,6 +570,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
if (http_handle->target_info.is_client && !http_handle->read_response)
@@ -944,6 +946,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
if (headers->transfer_encoding
@@ -1057,6 +1060,7 @@
http_handle->read_operation.iov = NULL;
http_handle->read_operation.iovcnt = 0;
http_handle->read_operation.operation = NULL;
+ http_handle->read_operation.driver_handle = NULL;
http_handle->read_operation.nbytes = 0;
globus_mutex_unlock(&http_handle->mutex);
@@ -1394,7 +1398,7 @@
http_handle);
break;
}
- /* FALLSTHROUGH, I think */
+ /* FALLSTHROUGH */
case GLOBUS_XIO_HTTP_REQUEST_LINE:
case GLOBUS_XIO_HTTP_HEADERS:
case GLOBUS_XIO_HTTP_CHUNK_CRLF:
@@ -1477,6 +1481,7 @@
return GLOBUS_SUCCESS;
}
http_handle->write_operation.operation = op;
+ http_handle->write_operation.driver_handle = globus_xio_operation_get_driver_handle(op);
http_handle->write_operation.iov = globus_libc_malloc((iovec_count + 2) *
sizeof(globus_xio_iovec_t));
@@ -1527,6 +1532,7 @@
error_exit:
http_handle->write_operation.wait_for = 0;
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
return result;
}
/* globus_i_xio_http_write_chunk() */
@@ -1607,6 +1613,7 @@
http_handle->write_operation.iov = NULL;
http_handle->write_operation.iovcnt = 0;
http_handle->write_operation.operation = NULL;
+ http_handle->write_operation.driver_handle = NULL;
http_handle->write_operation.nbytes = 0;
http_handle->write_operation.wait_for = 0;
@@ -1879,7 +1886,6 @@
{
globus_list_t * l;
globus_i_xio_http_cancellation_t * cancellation = user_arg;
- globus_xio_driver_handle_t driver_handle;
globus_mutex_lock(&globus_i_xio_http_cancel_mutex);
l = globus_list_search(globus_i_xio_http_cancellable_handles, user_arg);
More information about the xio-commit
mailing list