Jabberd14-1.6.0/jabberd/log.c/_debug_log_zonefilter

Last-modified: 2007-04-14 (土) 22:30:11

このページを編集する際は,編集に関する方針に従ってください.

概要

* check if the specified debugging zone has been selected

引数

* @param zone the zone where the logging message comes from
* @return 1 if it should be logged, 0 if not

実装

static inline int _debug_log_zonefilter(char *zone) {

   char *pos, c = '\0';
   if(zone != NULL && debug__zones != NULL)
   {
	pos = strchr(zone,'.');
       if(pos != NULL)
       {
           c = *pos;
           *pos = '\0'; /* chop */
       }
       if(xhash_get(debug__zones,zone) == NULL)
           return 0;
       if(pos != NULL)
           *pos = c; /* restore */
   }
   return 1;

}

呼出元

#related: relatedプラグインは廃止されました。