From: miker Date: Fri, 11 Apr 2008 12:13:59 +0000 (+0000) Subject: Patch from Scott McKellar: X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea1f513d54873b0cf5a434001bc55b18c72361bc;p=working%2FOpenSRF.git Patch from Scott McKellar: This patch elinminates the use of the osrf_clearbuf macro in several spots. In each case, the buffer needs to be initialized to an empty string, because the call to jid_get_* doesn't necessarily populate it with anything else. In debugging mode, osrf_clearbuf() will fill the field with exclamation points, which is not helpful in this context. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1302 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/libopensrf/osrf_transgroup.c b/src/libopensrf/osrf_transgroup.c index 566267b..e6a4c52 100644 --- a/src/libopensrf/osrf_transgroup.c +++ b/src/libopensrf/osrf_transgroup.c @@ -89,7 +89,7 @@ int osrfTransportGroupSendMatch( osrfTransportGroup* grp, transport_message* msg if(!(grp && msg)) return -1; char domain[256]; - osrf_clearbuf(domain, sizeof(domain)); + domain[0] = '\0'; jid_get_domain( msg->recipient, domain, 255 ); osrfTransportGroupNode* node = osrfHashGet(grp->nodes, domain); @@ -108,15 +108,15 @@ int osrfTransportGroupSend( osrfTransportGroup* grp, transport_message* msg ) { int bufsize = 256; char domain[bufsize]; - osrf_clearbuf(domain, sizeof(domain)); + domain[0] = '\0'; jid_get_domain( msg->recipient, domain, bufsize - 1 ); char msgrecip[bufsize]; - osrf_clearbuf(msgrecip, sizeof(msgrecip)); + msgrecip[0] = '\0'; jid_get_username(msg->recipient, msgrecip, bufsize - 1); char msgres[bufsize]; - osrf_clearbuf(msgres, sizeof(msgres)); + msgres[0] = '\0'; jid_get_resource(msg->recipient, msgres, bufsize - 1); char* firstdomain = NULL;