[Opensrf-commits] r1302 - trunk/src/libopensrf
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Apr 11 08:51:32 EDT 2008
Author: miker
Date: 2008-04-11 08:13:59 -0400 (Fri, 11 Apr 2008)
New Revision: 1302
Modified:
trunk/src/libopensrf/osrf_transgroup.c
Log:
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.
Modified: trunk/src/libopensrf/osrf_transgroup.c
===================================================================
--- trunk/src/libopensrf/osrf_transgroup.c 2008-04-09 17:41:39 UTC (rev 1301)
+++ trunk/src/libopensrf/osrf_transgroup.c 2008-04-11 12:13:59 UTC (rev 1302)
@@ -89,7 +89,7 @@
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 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;
More information about the opensrf-commits
mailing list