From ea1f513d54873b0cf5a434001bc55b18c72361bc Mon Sep 17 00:00:00 2001 From: miker Date: Fri, 11 Apr 2008 12:13:59 +0000 Subject: [PATCH] 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 --- src/libopensrf/osrf_transgroup.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.43.2