Files
macports-ports/net/jabber/files/jabberd_log.cc.patch
Joshua Root 5114b7ad47 jabber: update to 1.6.1.1, apply FreeBSD patches
Also remove ssl variant and just enable TLS support always (which now
uses gnutls).
2018-04-21 22:55:35 +10:00

33 lines
850 B
Diff

--- jabberd/log.cc.orig 2007-07-20 13:56:59 UTC
+++ jabberd/log.cc
@@ -83,21 +83,22 @@ static char *debug_log_timestamp(void) {
* @return 1 if it should be logged, 0 if not
*/
static inline int _debug_log_zonefilter(char const* zone) {
- char *pos, c = '\0';
+ const char *pos;
+ char *tmp;
+ int ret = 1;
if(zone != NULL && debug__zones != NULL)
{
pos = strchr(zone,'.');
if(pos != NULL)
{
- c = *pos;
- *pos = '\0'; /* chop */
+ tmp = strndup(zone, pos - zone);
}
- if(xhash_get(debug__zones,zone) == NULL)
- return 0;
+ if(xhash_get(debug__zones, (pos ? tmp : zone)) == NULL)
+ ret = 0;
if(pos != NULL)
- *pos = c; /* restore */
+ free(tmp);
}
- return 1;
+ return ret;
}
/**