/[svn]/branches/newio/modules/m_stats.c
ViewVC logotype

Diff of /branches/newio/modules/m_stats.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2419 by michael, Sun Jul 21 18:11:50 2013 UTC revision 2420 by michael, Tue Jul 23 17:45:56 2013 UTC
# Line 325  stats_memory(struct Client *source_p, in Line 325  stats_memory(struct Client *source_p, in
325    uint64_t channel_except_memory = 0;    uint64_t channel_except_memory = 0;
326    uint64_t channel_invex_memory = 0;    uint64_t channel_invex_memory = 0;
327    
   unsigned int safelist_count = 0;  
   uint64_t safelist_memory = 0;  
   
328    uint64_t wwm = 0;               /* whowas array memory used       */    uint64_t wwm = 0;               /* whowas array memory used       */
329    uint64_t conf_memory = 0;       /* memory used by conf lines      */    uint64_t conf_memory = 0;       /* memory used by conf lines      */
330    uint64_t mem_ips_stored;        /* memory used by ip address hash */    uint64_t mem_ips_stored;        /* memory used by ip address hash */
# Line 422  stats_memory(struct Client *source_p, in Line 419  stats_memory(struct Client *source_p, in
419      }      }
420    }    }
421    
   if ((safelist_count = dlink_list_length(&listing_client_list)))  
   {  
     safelist_memory = safelist_count * sizeof(struct ListTask);  
     DLINK_FOREACH(gptr, listing_client_list.head)  
     {  
       const struct Client *target_p = gptr->data;  
   
       DLINK_FOREACH(dlink, target_p->localClient->list_task->show_mask.head)  
         safelist_memory += strlen(dlink->data);  
   
       DLINK_FOREACH(dlink, target_p->localClient->list_task->hide_mask.head)  
         safelist_memory += strlen(dlink->data);  
     }  
   }  
   
422  #if 0  #if 0
423    /* XXX THIS has to be fixed !!!! -db */    /* XXX THIS has to be fixed !!!! -db */
424    /* count up all config items */    /* count up all config items */
# Line 512  stats_memory(struct Client *source_p, in Line 494  stats_memory(struct Client *source_p, in
494                           channel_members * sizeof(struct Membership) +                           channel_members * sizeof(struct Membership) +
495                           (channel_invites * sizeof(dlink_node)*2);                           (channel_invites * sizeof(dlink_node)*2);
496    
   sendto_one(source_p, ":%s %d %s z :Safelist %u(%llu)",  
              me.name, RPL_STATSDEBUG, source_p->name,  
              safelist_count, safelist_memory);  
   
497    sendto_one(source_p, ":%s %d %s z :Whowas users %u(%llu)",    sendto_one(source_p, ":%s %d %s z :Whowas users %u(%llu)",
498               me.name, RPL_STATSDEBUG, source_p->name,               me.name, RPL_STATSDEBUG, source_p->name,
499               wwu, (unsigned long long)(wwu * sizeof(struct Client)));               wwu, (unsigned long long)(wwu * sizeof(struct Client)));

Legend:
Removed from v.2419  
changed lines
  Added in v.2420

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28