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)
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;
}