From: erickson Date: Fri, 19 Sep 2008 19:27:56 +0000 (+0000) Subject: added a force set option on log XID to override it even we can act as an origin client X-Git-Tag: osrf_rel_2_0_1~561 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9c8e961a00bebf62b34d222e0a088b5c77663372;p=OpenSRF.git added a force set option on log XID to override it even we can act as an origin client git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1433 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/include/opensrf/log.h b/include/opensrf/log.h index b3741c9..11c273e 100644 --- a/include/opensrf/log.h +++ b/include/opensrf/log.h @@ -72,7 +72,14 @@ void osrfLogActivity( const char* file, int line, const char* msg, ... ); void osrfLogCleanup( void ); void osrfLogClearXid( void ); +/** + * Set the log XID. This only sets the xid if we are not the origin client + */ void osrfLogSetXid(char* xid); +/** + * Set the log XID regardless of whether we are the origin client + */ +void osrfLogForceXid(char* xid); void osrfLogMkXid( void ); void osrfLogSetIsClient(int is); char* osrfLogGetXid( void ); diff --git a/src/libopensrf/log.c b/src/libopensrf/log.c index 01e60e0..14fdf06 100644 --- a/src/libopensrf/log.c +++ b/src/libopensrf/log.c @@ -53,6 +53,9 @@ void osrfLogClearXid( void ) { _osrfLogSetXid(""); } void osrfLogSetXid(char* xid) { if(!_osrfLogIsClient) _osrfLogSetXid(xid); } +void osrfLogForceXid(char* xid) { + _osrfLogSetXid(xid); +} void osrfLogMkXid( void ) { if(_osrfLogIsClient) {