From 5f359e4c6c34c46fde1845c2a73d9e04a8b6bcd4 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 13 Dec 2006 17:12:09 +0000 Subject: [PATCH] replaced (printf style) format buffer calls with non-format calls to prevent issues with embedded % symbols git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@806 9efc2488-bf62-4759-914b-345cdb29e865 --- src/gateway/osrf_json_gateway.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gateway/osrf_json_gateway.c b/src/gateway/osrf_json_gateway.c index f370d0c..2979ccc 100644 --- a/src/gateway/osrf_json_gateway.c +++ b/src/gateway/osrf_json_gateway.c @@ -154,9 +154,15 @@ static int osrf_json_gateway_method_handler (request_rec *r) { growing_buffer* act = buffer_init(128); buffer_fadd(act, "[%s] [%s] %s %s", r->connection->remote_ip, authtoken, service, method ); char* str; int i = 0; - while( (str = osrfStringArrayGetString(mparams, i++)) ) - if( i == 1 ) buffer_fadd(act, " %s", str); - else buffer_fadd(act, ", %s", str); + while( (str = osrfStringArrayGetString(mparams, i++)) ) { + if( i == 1 ) { + OSRF_BUFFER_ADD(act, " "); + OSRF_BUFFER_ADD(act, str); + } else { + OSRF_BUFFER_ADD(act, ", "); + OSRF_BUFFER_ADD(act, str); + } + } osrfLogActivity( OSRF_LOG_MARK, act->buf ); buffer_free(act); -- 2.11.0