ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/src/whowas.c
(Generate patch)

Comparing ircd-hybrid/src/whowas.c (file contents):
Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
Revision 1028 by michael, Sun Nov 8 13:03:38 2009 UTC

# Line 53 | Line 53 | add_history(struct Client *client_p, int
53   {
54    struct Whowas *who = &WHOWAS[whowas_next];
55  
56 <  assert(client_p != NULL);
57 <
58 <  if (client_p == NULL)
59 <    return;
60 <
61 <  /* XXX when is this possible? Looks like it could happen
62 <   * (with a half registered client.)
63 <   * and what is the correct action here? - Dianora
64 <   */
65 <  if (client_p->servptr == NULL)
66 <    return;
56 >  assert(client_p && client_p->servptr);
57  
58    if (who->hashv != -1)
59    {
# Line 72 | Line 62 | add_history(struct Client *client_p, int
62      del_whowas_from_list(&WHOWASHASH[who->hashv], who);
63    }
64  
65 <  who->hashv  = strhash(client_p->name);
65 >  who->hashv = strhash(client_p->name);
66    who->logoff = CurrentTime;
67  
68    /* NOTE: strcpy ok here, the sizes in the client struct MUST
# Line 134 | Line 124 | get_history(const char *nick, time_t tim
124   }
125  
126   void
127 < count_whowas_memory(int *wwu, unsigned long *wwum)
127 > count_whowas_memory(unsigned int *wwu, uint64_t *wwum)
128   {
129 <  struct Whowas *tmp;
129 >  const struct Whowas *tmp;
130    int i;
131 <  int u = 0;
132 <  unsigned long um = 0;
131 >  unsigned int u = 0;
132 >  uint64_t um = 0;
133  
134    /* count the number of used whowas structs in 'u'   */
135    /* count up the memory used of whowas structs in um */
136 <  for (i = 0, tmp = &WHOWAS[0]; i < NICKNAMEHISTORYLENGTH; i++, tmp++)
136 >  for (i = 0, tmp = &WHOWAS[0]; i < NICKNAMEHISTORYLENGTH; ++i, ++tmp)
137    {
138      if (tmp->hashv != -1)
139      {
140 <      u++;
140 >      ++u;
141        um += sizeof(struct Whowas);
142      }
143    }

Comparing ircd-hybrid/src/whowas.c (property svn:keywords):
Revision 31 by knight, Sun Oct 2 20:34:05 2005 UTC vs.
Revision 1028 by michael, Sun Nov 8 13:03:38 2009 UTC

# Line 1 | Line 1
1 < "Id Revision"
1 > Id Revision

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)