[Opensrf-commits] r1912 - branches/rel_1_2/src/gateway (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Jan 28 22:48:39 EST 2010
Author: dbs
Date: 2010-01-28 22:48:37 -0500 (Thu, 28 Jan 2010)
New Revision: 1912
Modified:
branches/rel_1_2/src/gateway/osrf_http_translator.c
Log:
Backport r1906 from trunk: Provide a thread if the translator wasn't passed one in the request headers
Modified: branches/rel_1_2/src/gateway/osrf_http_translator.c
===================================================================
--- branches/rel_1_2/src/gateway/osrf_http_translator.c 2010-01-29 03:48:09 UTC (rev 1911)
+++ branches/rel_1_2/src/gateway/osrf_http_translator.c 2010-01-29 03:48:37 UTC (rev 1912)
@@ -127,7 +127,6 @@
trans->handle = osrfSystemGetTransportClient();
trans->recipient = apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_TO);
trans->service = apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_SERVICE);
- trans->thread = apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_THREAD); /* XXX create thread if necessary */
const char* timeout = apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_TIMEOUT);
if(timeout)
@@ -145,6 +144,11 @@
snprintf(buf, sizeof(buf), "%d%ld", getpid(), time(NULL));
trans->delim = md5sum(buf);
+ /* Use thread if it has been passed in; otherwise, just use the delimiter */
+ trans->thread = apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_THREAD)
+ ? apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_THREAD)
+ : (const char*)trans->delim;
+
return trans;
}
More information about the opensrf-commits
mailing list