summaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2012-11-04 15:37:10 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2012-11-04 15:37:10 +0000
commit90aeacbf12d63dcd628caed461bd744639603d76 (patch)
tree5eb5c2aa3fd576ac33d84d2911482a3f200c1bea /src/hash.c
parent8daa0e2a6fe61e95dc2dd145ebbdb2b05c097196 (diff)
- Initial rewrite of the configuration subsystem
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/trunk@1632 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src/hash.c')
-rw-r--r--src/hash.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/hash.c b/src/hash.c
index d0b0a55..cd3fc1e 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -57,7 +57,7 @@ static struct Client *idTable[HASHSIZE];
static struct Client *clientTable[HASHSIZE];
static struct Channel *channelTable[HASHSIZE];
static struct UserHost *userhostTable[HASHSIZE];
-static struct ResvChannel *resvchannelTable[HASHSIZE];
+static struct MaskItem *resvchannelTable[HASHSIZE];
/* init_hash()
@@ -153,12 +153,12 @@ hash_add_channel(struct Channel *chptr)
}
void
-hash_add_resv(struct ResvChannel *chptr)
+hash_add_resv(struct MaskItem *conf)
{
- unsigned int hashv = strhash(chptr->name);
+ unsigned int hashv = strhash(conf->name);
- chptr->hnext = resvchannelTable[hashv];
- resvchannelTable[hashv] = chptr;
+ conf->hnext = resvchannelTable[hashv];
+ resvchannelTable[hashv] = conf;
}
void
@@ -305,10 +305,10 @@ hash_del_channel(struct Channel *chptr)
}
void
-hash_del_resv(struct ResvChannel *chptr)
+hash_del_resv(struct MaskItem *chptr)
{
unsigned int hashv = strhash(chptr->name);
- struct ResvChannel *tmp = resvchannelTable[hashv];
+ struct MaskItem *tmp = resvchannelTable[hashv];
if (tmp != NULL)
{
@@ -511,17 +511,17 @@ hash_get_bucket(int type, unsigned int hashv)
* if can't find one returns NULL, if can find it moves
* it to the top of the list and returns it.
*/
-struct ResvChannel *
+struct MaskItem *
hash_find_resv(const char *name)
{
unsigned int hashv = strhash(name);
- struct ResvChannel *chptr;
+ struct MaskItem *chptr;
if ((chptr = resvchannelTable[hashv]) != NULL)
{
if (irccmp(name, chptr->name))
{
- struct ResvChannel *prev;
+ struct MaskItem *prev;
while (prev = chptr, (chptr = chptr->hnext) != NULL)
{
@@ -769,7 +769,7 @@ delete_user_host(const char *user, const char *host, int global)
static int
exceeding_sendq(struct Client *to)
{
- if (dbuf_length(&to->localClient->buf_sendq) > (get_sendq(to) / 2))
+ if (dbuf_length(&to->localClient->buf_sendq) > (get_sendq(&to->localClient->confs) / 2))
return 1;
else
return 0;