From: erickson Date: Fri, 19 Sep 2008 19:28:15 +0000 (+0000) Subject: setting/clearing log XID. honoring client log xid if present X-Git-Tag: osrf_rel_2_0_1~560 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b4e07d9b67d411cda209d0a4f8c1452cd5a3f7a1;p=OpenSRF.git setting/clearing log XID. honoring client log xid if present git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1434 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/gateway/osrf_http_translator.c b/src/gateway/osrf_http_translator.c index 530b252..66bc90e 100644 --- a/src/gateway/osrf_http_translator.c +++ b/src/gateway/osrf_http_translator.c @@ -116,11 +116,8 @@ static osrfHttpTranslator* osrfNewHttpTranslator(request_rec* apreq) { osrfStringArrayFree(params); /* load the request headers */ - if (apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_XID) ) { - trans->localXid = 0; - } else { - trans->localXid = 1; - } + if (apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_XID)) // force our log xid to match the caller + osrfLogForceXid(strdup(apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_XID))); trans->handle = osrfSystemGetTransportClient(); trans->recipient = apr_table_get(apreq->headers_in, OSRF_HTTP_HEADER_TO); @@ -454,6 +451,7 @@ static int handler(request_rec *r) { testConnection(r); osrfHttpTranslator* trans = osrfNewHttpTranslator(r); + osrfLogMkXid(); if(trans->body) { stat = osrfHttpTranslatorProcess(trans); //osrfHttpTranslatorDebug(trans);