mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
dlink -> rb_dlink
This commit is contained in:
parent
b2f0da886e
commit
330fc5c10c
25 changed files with 476 additions and 475 deletions
21
src/cache.c
21
src/cache.c
|
@ -45,6 +45,7 @@
|
|||
#include "cache.h"
|
||||
#include "sprintf_irc.h"
|
||||
#include "irc_dictionary.h"
|
||||
#include "numeric.h"
|
||||
|
||||
static BlockHeap *cachefile_heap = NULL;
|
||||
static BlockHeap *cacheline_heap = NULL;
|
||||
|
@ -129,7 +130,7 @@ cache_file(const char *filename, const char *shortname, int flags)
|
|||
strlcpy(lineptr->data, " ", sizeof(lineptr->data));
|
||||
else
|
||||
strlcpy(lineptr->data, line, sizeof(lineptr->data));
|
||||
dlinkAddTail(lineptr, &lineptr->linenode, &cacheptr->contents);
|
||||
rb_dlinkAddTail(lineptr, &lineptr->linenode, &cacheptr->contents);
|
||||
}
|
||||
|
||||
fclose(in);
|
||||
|
@ -145,13 +146,13 @@ cache_file(const char *filename, const char *shortname, int flags)
|
|||
void
|
||||
free_cachefile(struct cachefile *cacheptr)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
if(cacheptr == NULL)
|
||||
return;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, cacheptr->contents.head)
|
||||
RB_DLINK_FOREACH_SAFE(ptr, next_ptr, cacheptr->contents.head)
|
||||
{
|
||||
BlockHeapFree(cacheline_heap, ptr->data);
|
||||
}
|
||||
|
@ -225,11 +226,11 @@ void
|
|||
send_user_motd(struct Client *source_p)
|
||||
{
|
||||
struct cacheline *lineptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
const char *myname = get_id(&me, source_p);
|
||||
const char *nick = get_id(source_p, source_p);
|
||||
|
||||
if(user_motd == NULL || dlink_list_length(&user_motd->contents) == 0)
|
||||
if(user_motd == NULL || rb_dlink_list_length(&user_motd->contents) == 0)
|
||||
{
|
||||
sendto_one(source_p, form_str(ERR_NOMOTD), myname, nick);
|
||||
return;
|
||||
|
@ -237,7 +238,7 @@ send_user_motd(struct Client *source_p)
|
|||
|
||||
sendto_one(source_p, form_str(RPL_MOTDSTART), myname, nick, me.name);
|
||||
|
||||
DLINK_FOREACH(ptr, user_motd->contents.head)
|
||||
RB_DLINK_FOREACH(ptr, user_motd->contents.head)
|
||||
{
|
||||
lineptr = ptr->data;
|
||||
sendto_one(source_p, form_str(RPL_MOTD), myname, nick, lineptr->data);
|
||||
|
@ -256,15 +257,15 @@ void
|
|||
send_oper_motd(struct Client *source_p)
|
||||
{
|
||||
struct cacheline *lineptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
if(oper_motd == NULL || dlink_list_length(&oper_motd->contents) == 0)
|
||||
if(oper_motd == NULL || rb_dlink_list_length(&oper_motd->contents) == 0)
|
||||
return;
|
||||
|
||||
sendto_one(source_p, form_str(RPL_OMOTDSTART),
|
||||
me.name, source_p->name);
|
||||
|
||||
DLINK_FOREACH(ptr, oper_motd->contents.head)
|
||||
RB_DLINK_FOREACH(ptr, oper_motd->contents.head)
|
||||
{
|
||||
lineptr = ptr->data;
|
||||
sendto_one(source_p, form_str(RPL_OMOTD),
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
#include "balloc.h"
|
||||
#include "s_log.h"
|
||||
|
||||
extern dlink_list global_channel_list;
|
||||
extern rb_dlink_list global_channel_list;
|
||||
|
||||
extern struct config_channel_entry ConfigChannel;
|
||||
extern BlockHeap *channel_heap;
|
||||
|
@ -134,7 +134,7 @@ struct membership *
|
|||
find_channel_membership(struct Channel *chptr, struct Client *client_p)
|
||||
{
|
||||
struct membership *msptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
if(!IsClient(client_p))
|
||||
return NULL;
|
||||
|
@ -142,7 +142,7 @@ find_channel_membership(struct Channel *chptr, struct Client *client_p)
|
|||
/* Pick the most efficient list to use to be nice to things like
|
||||
* CHANSERV which could be in a large number of channels
|
||||
*/
|
||||
if(dlink_list_length(&chptr->members) < dlink_list_length(&client_p->user->channel))
|
||||
if(rb_dlink_list_length(&chptr->members) < rb_dlink_list_length(&client_p->user->channel))
|
||||
{
|
||||
DLINK_FOREACH(ptr, chptr->members.head)
|
||||
{
|
||||
|
@ -215,11 +215,11 @@ add_user_to_channel(struct Channel *chptr, struct Client *client_p, int flags)
|
|||
msptr->client_p = client_p;
|
||||
msptr->flags = flags;
|
||||
|
||||
dlinkAdd(msptr, &msptr->usernode, &client_p->user->channel);
|
||||
dlinkAdd(msptr, &msptr->channode, &chptr->members);
|
||||
rb_dlinkAdd(msptr, &msptr->usernode, &client_p->user->channel);
|
||||
rb_dlinkAdd(msptr, &msptr->channode, &chptr->members);
|
||||
|
||||
if(MyClient(client_p))
|
||||
dlinkAdd(msptr, &msptr->locchannode, &chptr->locmembers);
|
||||
rb_dlinkAdd(msptr, &msptr->locchannode, &chptr->locmembers);
|
||||
}
|
||||
|
||||
/* remove_user_from_channel()
|
||||
|
@ -240,15 +240,15 @@ remove_user_from_channel(struct membership *msptr)
|
|||
client_p = msptr->client_p;
|
||||
chptr = msptr->chptr;
|
||||
|
||||
dlinkDelete(&msptr->usernode, &client_p->user->channel);
|
||||
dlinkDelete(&msptr->channode, &chptr->members);
|
||||
rb_dlinkDelete(&msptr->usernode, &client_p->user->channel);
|
||||
rb_dlinkDelete(&msptr->channode, &chptr->members);
|
||||
|
||||
if(client_p->servptr == &me)
|
||||
dlinkDelete(&msptr->locchannode, &chptr->locmembers);
|
||||
rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers);
|
||||
|
||||
chptr->users_last = CurrentTime;
|
||||
|
||||
if(!(chptr->mode.mode & MODE_PERMANENT) && dlink_list_length(&chptr->members) <= 0)
|
||||
if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0)
|
||||
destroy_channel(chptr);
|
||||
|
||||
BlockHeapFree(member_heap, msptr);
|
||||
|
@ -267,8 +267,8 @@ remove_user_from_channels(struct Client *client_p)
|
|||
{
|
||||
struct Channel *chptr;
|
||||
struct membership *msptr;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
if(client_p == NULL)
|
||||
return;
|
||||
|
@ -278,14 +278,14 @@ remove_user_from_channels(struct Client *client_p)
|
|||
msptr = ptr->data;
|
||||
chptr = msptr->chptr;
|
||||
|
||||
dlinkDelete(&msptr->channode, &chptr->members);
|
||||
rb_dlinkDelete(&msptr->channode, &chptr->members);
|
||||
|
||||
if(client_p->servptr == &me)
|
||||
dlinkDelete(&msptr->locchannode, &chptr->locmembers);
|
||||
rb_dlinkDelete(&msptr->locchannode, &chptr->locmembers);
|
||||
|
||||
chptr->users_last = CurrentTime;
|
||||
|
||||
if(!(chptr->mode.mode & MODE_PERMANENT) && dlink_list_length(&chptr->members) <= 0)
|
||||
if(!(chptr->mode.mode & MODE_PERMANENT) && rb_dlink_list_length(&chptr->members) <= 0)
|
||||
destroy_channel(chptr);
|
||||
|
||||
BlockHeapFree(member_heap, msptr);
|
||||
|
@ -306,7 +306,7 @@ void
|
|||
invalidate_bancache_user(struct Client *client_p)
|
||||
{
|
||||
struct membership *msptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
if(client_p == NULL)
|
||||
return;
|
||||
|
@ -343,15 +343,15 @@ check_channel_name(const char *name)
|
|||
|
||||
/* free_channel_list()
|
||||
*
|
||||
* input - dlink list to free
|
||||
* input - rb_dlink list to free
|
||||
* output -
|
||||
* side effects - list of b/e/I modes is cleared
|
||||
*/
|
||||
void
|
||||
free_channel_list(dlink_list * list)
|
||||
free_channel_list(rb_dlink_list * list)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
struct Ban *actualBan;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
|
||||
|
@ -373,7 +373,7 @@ free_channel_list(dlink_list * list)
|
|||
void
|
||||
destroy_channel(struct Channel *chptr)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, chptr->invites.head)
|
||||
{
|
||||
|
@ -389,7 +389,7 @@ destroy_channel(struct Channel *chptr)
|
|||
/* Free the topic */
|
||||
free_topic(chptr);
|
||||
|
||||
dlinkDelete(&chptr->node, &global_channel_list);
|
||||
rb_dlinkDelete(&chptr->node, &global_channel_list);
|
||||
del_from_channel_hash(chptr->chname, chptr);
|
||||
free_channel(chptr);
|
||||
}
|
||||
|
@ -421,7 +421,7 @@ channel_member_names(struct Channel *chptr, struct Client *client_p, int show_eo
|
|||
{
|
||||
struct membership *msptr;
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
char lbuf[BUFSIZE];
|
||||
char *t;
|
||||
int mlen;
|
||||
|
@ -492,8 +492,8 @@ channel_member_names(struct Channel *chptr, struct Client *client_p, int show_eo
|
|||
void
|
||||
del_invite(struct Channel *chptr, struct Client *who)
|
||||
{
|
||||
dlinkFindDestroy(who, &chptr->invites);
|
||||
dlinkFindDestroy(chptr, &who->user->invited);
|
||||
rb_dlinkFindDestroy(who, &chptr->invites);
|
||||
rb_dlinkFindDestroy(chptr, &who->user->invited);
|
||||
}
|
||||
|
||||
/* is_banned()
|
||||
|
@ -511,7 +511,7 @@ is_banned(struct Channel *chptr, struct Client *who, struct membership *msptr,
|
|||
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
char src_althost[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
char *s3 = NULL;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *actualBan = NULL;
|
||||
struct Ban *actualExcept = NULL;
|
||||
|
||||
|
@ -617,7 +617,7 @@ is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
|
|||
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
char src_althost[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
char *s3 = NULL;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *actualBan = NULL;
|
||||
struct Ban *actualExcept = NULL;
|
||||
|
||||
|
@ -717,8 +717,8 @@ is_quieted(struct Channel *chptr, struct Client *who, struct membership *msptr,
|
|||
int
|
||||
can_join(struct Client *source_p, struct Channel *chptr, char *key)
|
||||
{
|
||||
dlink_node *invite = NULL;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *invite = NULL;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *invex = NULL;
|
||||
char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
|
@ -781,7 +781,7 @@ can_join(struct Client *source_p, struct Channel *chptr, char *key)
|
|||
return (ERR_BADCHANNELKEY);
|
||||
|
||||
if(chptr->mode.limit &&
|
||||
dlink_list_length(&chptr->members) >= (unsigned long) chptr->mode.limit)
|
||||
rb_dlink_list_length(&chptr->members) >= (unsigned long) chptr->mode.limit)
|
||||
i = ERR_CHANNELISFULL;
|
||||
if(chptr->mode.mode & MODE_REGONLY && EmptyString(source_p->user->suser))
|
||||
i = ERR_NEEDREGGEDNICK;
|
||||
|
@ -879,7 +879,7 @@ find_bannickchange_channel(struct Client *client_p)
|
|||
{
|
||||
struct Channel *chptr;
|
||||
struct membership *msptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
char src_host[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
char src_iphost[NICKLEN + USERLEN + HOSTLEN + 6];
|
||||
|
||||
|
|
22
src/chmode.c
22
src/chmode.c
|
@ -65,7 +65,7 @@ void set_channel_mode(struct Client *, struct Client *,
|
|||
struct Channel *, struct membership *, int, const char **);
|
||||
|
||||
int add_id(struct Client *source_p, struct Channel *chptr,
|
||||
const char *banid, dlink_list * list, long mode_type);
|
||||
const char *banid, rb_dlink_list * list, long mode_type);
|
||||
|
||||
static struct ChModeChange mode_changes[BUFSIZE];
|
||||
static int mode_count;
|
||||
|
@ -89,19 +89,19 @@ get_channel_access(struct Client *source_p, struct membership *msptr)
|
|||
*/
|
||||
int
|
||||
add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
|
||||
dlink_list * list, long mode_type)
|
||||
rb_dlink_list * list, long mode_type)
|
||||
{
|
||||
struct Ban *actualBan;
|
||||
static char who[USERHOST_REPLYLEN];
|
||||
char *realban = LOCAL_COPY(banid);
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
/* dont let local clients overflow the banlist, or set redundant
|
||||
* bans
|
||||
*/
|
||||
if(MyClient(source_p))
|
||||
{
|
||||
if((dlink_list_length(&chptr->banlist) + dlink_list_length(&chptr->exceptlist) + dlink_list_length(&chptr->invexlist) + dlink_list_length(&chptr->quietlist)) >= (chptr->mode.mode & MODE_EXLIMIT ? ConfigChannel.max_bans_large : ConfigChannel.max_bans))
|
||||
if((rb_dlink_list_length(&chptr->banlist) + rb_dlink_list_length(&chptr->exceptlist) + rb_dlink_list_length(&chptr->invexlist) + rb_dlink_list_length(&chptr->quietlist)) >= (chptr->mode.mode & MODE_EXLIMIT ? ConfigChannel.max_bans_large : ConfigChannel.max_bans))
|
||||
{
|
||||
sendto_one(source_p, form_str(ERR_BANLISTFULL),
|
||||
me.name, source_p->name, chptr->chname, realban);
|
||||
|
@ -135,7 +135,7 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
|
|||
actualBan = allocate_ban(realban, who);
|
||||
actualBan->when = CurrentTime;
|
||||
|
||||
dlinkAdd(actualBan, &actualBan->node, list);
|
||||
rb_dlinkAdd(actualBan, &actualBan->node, list);
|
||||
|
||||
/* invalidate the can_send() cache */
|
||||
if(mode_type == CHFL_BAN || mode_type == CHFL_QUIET || mode_type == CHFL_EXCEPTION)
|
||||
|
@ -151,9 +151,9 @@ add_id(struct Client *source_p, struct Channel *chptr, const char *banid,
|
|||
* side effects - given id is removed from the appropriate list
|
||||
*/
|
||||
int
|
||||
del_id(struct Channel *chptr, const char *banid, dlink_list * list, long mode_type)
|
||||
del_id(struct Channel *chptr, const char *banid, rb_dlink_list * list, long mode_type)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *banptr;
|
||||
|
||||
if(EmptyString(banid))
|
||||
|
@ -165,7 +165,7 @@ del_id(struct Channel *chptr, const char *banid, dlink_list * list, long mode_ty
|
|||
|
||||
if(irccmp(banid, banptr->banstr) == 0)
|
||||
{
|
||||
dlinkDelete(&banptr->node, list);
|
||||
rb_dlinkDelete(&banptr->node, list);
|
||||
free_ban(banptr);
|
||||
|
||||
/* invalidate the can_send() cache */
|
||||
|
@ -492,8 +492,8 @@ chm_ban(struct Client *source_p, struct Channel *chptr,
|
|||
{
|
||||
const char *mask;
|
||||
const char *raw_mask;
|
||||
dlink_list *list;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_list *list;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *banptr;
|
||||
int errorval;
|
||||
int rpl_list;
|
||||
|
@ -1596,6 +1596,6 @@ set_channel_mode(struct Client *client_p, struct Client *source_p,
|
|||
}
|
||||
|
||||
/* only propagate modes originating locally, or if we're hubbing */
|
||||
if(MyClient(source_p) || dlink_list_length(&serv_list) > 1)
|
||||
if(MyClient(source_p) || rb_dlink_list_length(&serv_list) > 1)
|
||||
send_cap_mode_changes(client_p, source_p, chptr, mode_changes, mode_count);
|
||||
}
|
||||
|
|
14
src/class.c
14
src/class.c
|
@ -44,7 +44,7 @@
|
|||
#define BAD_PING -2
|
||||
#define BAD_CLIENT_CLASS -3
|
||||
|
||||
dlink_list class_list;
|
||||
rb_dlink_list class_list;
|
||||
struct Class *default_class;
|
||||
|
||||
struct Class *
|
||||
|
@ -190,7 +190,7 @@ add_class(struct Class *classptr)
|
|||
|
||||
if(tmpptr == default_class)
|
||||
{
|
||||
dlinkAddAlloc(classptr, &class_list);
|
||||
rb_dlinkAddAlloc(classptr, &class_list);
|
||||
CurrUsers(classptr) = 0;
|
||||
}
|
||||
else
|
||||
|
@ -221,7 +221,7 @@ struct Class *
|
|||
find_class(const char *classname)
|
||||
{
|
||||
struct Class *cltmp;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
if(classname == NULL)
|
||||
return default_class;
|
||||
|
@ -248,8 +248,8 @@ void
|
|||
check_class()
|
||||
{
|
||||
struct Class *cltmp;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, class_list.head)
|
||||
{
|
||||
|
@ -257,7 +257,7 @@ check_class()
|
|||
|
||||
if(MaxUsers(cltmp) < 0)
|
||||
{
|
||||
dlinkDestroy(ptr, &class_list);
|
||||
rb_dlinkDestroy(ptr, &class_list);
|
||||
if(CurrUsers(cltmp) <= 0)
|
||||
free_class(cltmp);
|
||||
}
|
||||
|
@ -289,7 +289,7 @@ void
|
|||
report_classes(struct Client *source_p)
|
||||
{
|
||||
struct Class *cltmp;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, class_list.head)
|
||||
{
|
||||
|
|
128
src/client.c
128
src/client.c
|
@ -65,8 +65,8 @@
|
|||
|
||||
#define DEBUG_EXITED_CLIENTS
|
||||
|
||||
static void check_pings_list(dlink_list * list);
|
||||
static void check_unknowns_list(dlink_list * list);
|
||||
static void check_pings_list(rb_dlink_list * list);
|
||||
static void check_unknowns_list(rb_dlink_list * list);
|
||||
static void free_exited_clients(void *unused);
|
||||
static void exit_aborted_clients(void *unused);
|
||||
|
||||
|
@ -94,19 +94,19 @@ enum
|
|||
G_LINED
|
||||
};
|
||||
|
||||
dlink_list dead_list;
|
||||
rb_dlink_list dead_list;
|
||||
#ifdef DEBUG_EXITED_CLIENTS
|
||||
static dlink_list dead_remote_list;
|
||||
static rb_dlink_list dead_remote_list;
|
||||
#endif
|
||||
|
||||
struct abort_client
|
||||
{
|
||||
dlink_node node;
|
||||
rb_dlink_node node;
|
||||
struct Client *client;
|
||||
char notice[REASONLEN];
|
||||
};
|
||||
|
||||
static dlink_list abort_list;
|
||||
static rb_dlink_list abort_list;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -168,7 +168,7 @@ make_client(struct Client *from)
|
|||
client_p->preClient = (struct PreClient *) BlockHeapAlloc(pclient_heap);
|
||||
|
||||
/* as good a place as any... */
|
||||
dlinkAdd(client_p, &client_p->localClient->tnode, &unknown_list);
|
||||
rb_dlinkAdd(client_p, &client_p->localClient->tnode, &unknown_list);
|
||||
}
|
||||
else
|
||||
{ /* from is not NULL */
|
||||
|
@ -293,12 +293,12 @@ check_pings(void *notused)
|
|||
* side effects -
|
||||
*/
|
||||
static void
|
||||
check_pings_list(dlink_list * list)
|
||||
check_pings_list(rb_dlink_list * list)
|
||||
{
|
||||
char scratch[32]; /* way too generous but... */
|
||||
struct Client *client_p; /* current local client_p being examined */
|
||||
int ping = 0; /* ping time value from client */
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, list->head)
|
||||
{
|
||||
|
@ -360,9 +360,9 @@ check_pings_list(dlink_list * list)
|
|||
* side effects - unknown clients get marked for termination after n seconds
|
||||
*/
|
||||
static void
|
||||
check_unknowns_list(dlink_list * list)
|
||||
check_unknowns_list(rb_dlink_list * list)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
struct Client *client_p;
|
||||
int timeout;
|
||||
|
||||
|
@ -449,7 +449,7 @@ check_banned_lines(void)
|
|||
{
|
||||
struct Client *client_p; /* current local client_p being examined */
|
||||
struct ConfItem *aconf = NULL;
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
|
||||
{
|
||||
|
@ -578,8 +578,8 @@ check_klines(void)
|
|||
{
|
||||
struct Client *client_p;
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
|
||||
{
|
||||
|
@ -619,8 +619,8 @@ check_glines(void)
|
|||
{
|
||||
struct Client *client_p;
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
|
||||
{
|
||||
|
@ -668,8 +668,8 @@ check_dlines(void)
|
|||
{
|
||||
struct Client *client_p;
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
|
||||
{
|
||||
|
@ -718,8 +718,8 @@ check_xlines(void)
|
|||
{
|
||||
struct Client *client_p;
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, lclient_list.head)
|
||||
{
|
||||
|
@ -826,7 +826,7 @@ remove_client_from_list(struct Client *client_p)
|
|||
if(client_p->node.prev == NULL && client_p->node.next == NULL)
|
||||
return;
|
||||
|
||||
dlinkDelete(&client_p->node, &global_client_list);
|
||||
rb_dlinkDelete(&client_p->node, &global_client_list);
|
||||
|
||||
update_client_exit_stats(client_p);
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ is_remote_connect(struct Client *client_p)
|
|||
static void
|
||||
free_exited_clients(void *unused)
|
||||
{
|
||||
dlink_node *ptr, *next;
|
||||
rb_dlink_node *ptr, *next;
|
||||
struct Client *target_p;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next, dead_list.head)
|
||||
|
@ -1071,7 +1071,7 @@ free_exited_clients(void *unused)
|
|||
#ifdef DEBUG_EXITED_CLIENTS
|
||||
{
|
||||
struct abort_client *abt;
|
||||
dlink_node *aptr;
|
||||
rb_dlink_node *aptr;
|
||||
int found = 0;
|
||||
|
||||
DLINK_FOREACH(aptr, abort_list.head)
|
||||
|
@ -1092,7 +1092,7 @@ free_exited_clients(void *unused)
|
|||
|
||||
if(found)
|
||||
{
|
||||
dlinkDestroy(ptr, &dead_list);
|
||||
rb_dlinkDestroy(ptr, &dead_list);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1102,12 +1102,12 @@ free_exited_clients(void *unused)
|
|||
{
|
||||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
"Warning: null client on dead_list!");
|
||||
dlinkDestroy(ptr, &dead_list);
|
||||
rb_dlinkDestroy(ptr, &dead_list);
|
||||
continue;
|
||||
}
|
||||
release_client_state(target_p);
|
||||
free_client(target_p);
|
||||
dlinkDestroy(ptr, &dead_list);
|
||||
rb_dlinkDestroy(ptr, &dead_list);
|
||||
}
|
||||
|
||||
#ifdef DEBUG_EXITED_CLIENTS
|
||||
|
@ -1119,12 +1119,12 @@ free_exited_clients(void *unused)
|
|||
{
|
||||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
"Warning: null client on dead_list!");
|
||||
dlinkDestroy(ptr, &dead_list);
|
||||
rb_dlinkDestroy(ptr, &dead_list);
|
||||
continue;
|
||||
}
|
||||
release_client_state(target_p);
|
||||
free_client(target_p);
|
||||
dlinkDestroy(ptr, &dead_remote_list);
|
||||
rb_dlinkDestroy(ptr, &dead_remote_list);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1144,7 +1144,7 @@ recurse_send_quits(struct Client *client_p, struct Client *source_p,
|
|||
const char *comment)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr, *ptr_next;
|
||||
rb_dlink_node *ptr, *ptr_next;
|
||||
/* If this server can handle quit storm (QS) removal
|
||||
* of dependents, just send the SQUIT
|
||||
*/
|
||||
|
@ -1183,7 +1183,7 @@ static void
|
|||
recurse_remove_clients(struct Client *source_p, const char *comment)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr, *ptr_next;
|
||||
rb_dlink_node *ptr, *ptr_next;
|
||||
|
||||
if(IsMe(source_p))
|
||||
return;
|
||||
|
@ -1235,7 +1235,7 @@ remove_dependents(struct Client *client_p,
|
|||
struct Client *from, const char *comment, const char *comment1)
|
||||
{
|
||||
struct Client *to;
|
||||
dlink_node *ptr, *next;
|
||||
rb_dlink_node *ptr, *next;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next, serv_list.head)
|
||||
{
|
||||
|
@ -1255,14 +1255,14 @@ void
|
|||
exit_aborted_clients(void *unused)
|
||||
{
|
||||
struct abort_client *abt;
|
||||
dlink_node *ptr, *next;
|
||||
rb_dlink_node *ptr, *next;
|
||||
DLINK_FOREACH_SAFE(ptr, next, abort_list.head)
|
||||
{
|
||||
abt = ptr->data;
|
||||
|
||||
#ifdef DEBUG_EXITED_CLIENTS
|
||||
{
|
||||
if(dlinkFind(abt->client, &dead_list))
|
||||
if(rb_dlinkFind(abt->client, &dead_list))
|
||||
{
|
||||
s_assert(0);
|
||||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
|
@ -1277,7 +1277,7 @@ exit_aborted_clients(void *unused)
|
|||
#endif
|
||||
|
||||
s_assert(*((unsigned long*)abt->client) != 0xdeadbeef); /* This is lame but its a debug thing */
|
||||
dlinkDelete(ptr, &abort_list);
|
||||
rb_dlinkDelete(ptr, &abort_list);
|
||||
|
||||
if(IsAnyServer(abt->client))
|
||||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
|
@ -1318,7 +1318,7 @@ dead_link(struct Client *client_p)
|
|||
SetIOError(client_p);
|
||||
SetDead(client_p);
|
||||
SetClosing(client_p);
|
||||
dlinkAdd(abt, &abt->node, &abort_list);
|
||||
rb_dlinkAdd(abt, &abt->node, &abort_list);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1327,10 +1327,10 @@ static inline void
|
|||
exit_generic_client(struct Client *client_p, struct Client *source_p, struct Client *from,
|
||||
const char *comment)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
if(IsOper(source_p))
|
||||
dlinkFindDestroy(source_p, &oper_list);
|
||||
rb_dlinkFindDestroy(source_p, &oper_list);
|
||||
|
||||
sendto_common_channels_local(source_p, ":%s!%s@%s QUIT :%s",
|
||||
source_p->name,
|
||||
|
@ -1375,7 +1375,7 @@ exit_remote_client(struct Client *client_p, struct Client *source_p, struct Clie
|
|||
|
||||
if(source_p->servptr && source_p->servptr->serv)
|
||||
{
|
||||
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->users);
|
||||
rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->users);
|
||||
}
|
||||
|
||||
if((source_p->flags & FLAGS_KILLED) == 0)
|
||||
|
@ -1388,9 +1388,9 @@ exit_remote_client(struct Client *client_p, struct Client *source_p, struct Clie
|
|||
|
||||
SetDead(source_p);
|
||||
#ifdef DEBUG_EXITED_CLIENTS
|
||||
dlinkAddAlloc(source_p, &dead_remote_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_remote_list);
|
||||
#else
|
||||
dlinkAddAlloc(source_p, &dead_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_list);
|
||||
#endif
|
||||
return(CLIENT_EXITED);
|
||||
}
|
||||
|
@ -1406,7 +1406,7 @@ exit_unknown_client(struct Client *client_p, struct Client *source_p, struct Cli
|
|||
delete_auth_queries(source_p);
|
||||
client_flush_input(source_p);
|
||||
del_unknown_ip(source_p);
|
||||
dlinkDelete(&source_p->localClient->tnode, &unknown_list);
|
||||
rb_dlinkDelete(&source_p->localClient->tnode, &unknown_list);
|
||||
|
||||
if(!IsIOError(source_p))
|
||||
sendto_one(source_p, "ERROR :Closing Link: %s (%s)",
|
||||
|
@ -1422,7 +1422,7 @@ exit_unknown_client(struct Client *client_p, struct Client *source_p, struct Cli
|
|||
del_from_client_hash(source_p->name, source_p);
|
||||
remove_client_from_list(source_p);
|
||||
SetDead(source_p);
|
||||
dlinkAddAlloc(source_p, &dead_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_list);
|
||||
|
||||
/* Note that we don't need to add unknowns to the dead_list */
|
||||
return(CLIENT_EXITED);
|
||||
|
@ -1452,11 +1452,11 @@ exit_remote_server(struct Client *client_p, struct Client *source_p, struct Clie
|
|||
remove_dependents(client_p, source_p, from, IsPerson(from) ? newcomment : comment, comment1);
|
||||
|
||||
if(source_p->servptr && source_p->servptr->serv)
|
||||
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
|
||||
rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
|
||||
else
|
||||
s_assert(0);
|
||||
|
||||
dlinkFindDestroy(source_p, &global_serv_list);
|
||||
rb_dlinkFindDestroy(source_p, &global_serv_list);
|
||||
target_p = source_p->from;
|
||||
|
||||
if(target_p != NULL && IsServer(target_p) && target_p != client_p &&
|
||||
|
@ -1476,9 +1476,9 @@ exit_remote_server(struct Client *client_p, struct Client *source_p, struct Clie
|
|||
|
||||
SetDead(source_p);
|
||||
#ifdef DEBUG_EXITED_CLIENTS
|
||||
dlinkAddAlloc(source_p, &dead_remote_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_remote_list);
|
||||
#else
|
||||
dlinkAddAlloc(source_p, &dead_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_list);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -1490,11 +1490,11 @@ qs_server(struct Client *client_p, struct Client *source_p, struct Client *from,
|
|||
struct Client *target_p;
|
||||
|
||||
if(source_p->servptr && source_p->servptr->serv)
|
||||
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
|
||||
rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
|
||||
else
|
||||
s_assert(0);
|
||||
|
||||
dlinkFindDestroy(source_p, &global_serv_list);
|
||||
rb_dlinkFindDestroy(source_p, &global_serv_list);
|
||||
target_p = source_p->from;
|
||||
|
||||
if(has_id(source_p))
|
||||
|
@ -1505,7 +1505,7 @@ qs_server(struct Client *client_p, struct Client *source_p, struct Client *from,
|
|||
scache_split(source_p->serv->nameinfo);
|
||||
|
||||
SetDead(source_p);
|
||||
dlinkAddAlloc(source_p, &dead_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_list);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1517,8 +1517,8 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien
|
|||
static char newcomment[BUFSIZE];
|
||||
unsigned int sendk, recvk;
|
||||
|
||||
dlinkDelete(&source_p->localClient->tnode, &serv_list);
|
||||
dlinkFindDestroy(source_p, &global_serv_list);
|
||||
rb_dlinkDelete(&source_p->localClient->tnode, &serv_list);
|
||||
rb_dlinkFindDestroy(source_p, &global_serv_list);
|
||||
|
||||
unset_chcap_usage_counts(source_p);
|
||||
sendk = source_p->localClient->sendK;
|
||||
|
@ -1539,7 +1539,7 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien
|
|||
}
|
||||
|
||||
if(source_p->servptr && source_p->servptr->serv)
|
||||
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
|
||||
rb_dlinkDelete(&source_p->lnode, &source_p->servptr->serv->servers);
|
||||
else
|
||||
s_assert(0);
|
||||
|
||||
|
@ -1573,7 +1573,7 @@ exit_local_server(struct Client *client_p, struct Client *source_p, struct Clien
|
|||
scache_split(source_p->serv->nameinfo);
|
||||
|
||||
SetDead(source_p);
|
||||
dlinkAddAlloc(source_p, &dead_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_list);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1593,11 +1593,11 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien
|
|||
|
||||
s_assert(IsPerson(source_p));
|
||||
client_flush_input(source_p);
|
||||
dlinkDelete(&source_p->localClient->tnode, &lclient_list);
|
||||
dlinkDelete(&source_p->lnode, &me.serv->users);
|
||||
rb_dlinkDelete(&source_p->localClient->tnode, &lclient_list);
|
||||
rb_dlinkDelete(&source_p->lnode, &me.serv->users);
|
||||
|
||||
if(IsOper(source_p))
|
||||
dlinkFindDestroy(source_p, &local_oper_list);
|
||||
rb_dlinkFindDestroy(source_p, &local_oper_list);
|
||||
|
||||
sendto_realops_snomask(SNO_CCONN, L_ALL,
|
||||
"Client exiting: %s (%s@%s) [%s] [%s]",
|
||||
|
@ -1631,7 +1631,7 @@ exit_local_client(struct Client *client_p, struct Client *source_p, struct Clien
|
|||
}
|
||||
|
||||
SetDead(source_p);
|
||||
dlinkAddAlloc(source_p, &dead_list);
|
||||
rb_dlinkAddAlloc(source_p, &dead_list);
|
||||
return(CLIENT_EXITED);
|
||||
}
|
||||
|
||||
|
@ -1763,8 +1763,8 @@ count_remote_client_memory(size_t * count, size_t * remote_client_memory_used)
|
|||
void
|
||||
del_all_accepts(struct Client *client_p)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
struct Client *target_p;
|
||||
|
||||
if(MyClient(client_p) && client_p->localClient->allow_list.head)
|
||||
|
@ -1775,8 +1775,8 @@ del_all_accepts(struct Client *client_p)
|
|||
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->allow_list.head)
|
||||
{
|
||||
target_p = ptr->data;
|
||||
dlinkFindDestroy(client_p, &target_p->on_allow_list);
|
||||
dlinkDestroy(ptr, &client_p->localClient->allow_list);
|
||||
rb_dlinkFindDestroy(client_p, &target_p->on_allow_list);
|
||||
rb_dlinkDestroy(ptr, &client_p->localClient->allow_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1784,8 +1784,8 @@ del_all_accepts(struct Client *client_p)
|
|||
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->on_allow_list.head)
|
||||
{
|
||||
target_p = ptr->data;
|
||||
dlinkFindDestroy(client_p, &target_p->localClient->allow_list);
|
||||
dlinkDestroy(ptr, &client_p->on_allow_list);
|
||||
rb_dlinkFindDestroy(client_p, &target_p->localClient->allow_list);
|
||||
rb_dlinkDestroy(ptr, &client_p->on_allow_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1933,7 +1933,7 @@ free_user(struct User *user, struct Client *client_p)
|
|||
(unsigned long) user,
|
||||
(unsigned long) user->invited.head,
|
||||
(unsigned long) user->channel.head,
|
||||
dlink_list_length(&user->channel),
|
||||
rb_dlink_list_length(&user->channel),
|
||||
user->refcnt);
|
||||
s_assert(!user->refcnt);
|
||||
s_assert(!user->invited.head);
|
||||
|
|
78
src/hash.c
78
src/hash.c
|
@ -41,11 +41,11 @@
|
|||
#include "cache.h"
|
||||
#include "s_newconf.h"
|
||||
|
||||
dlink_list *clientTable;
|
||||
dlink_list *channelTable;
|
||||
dlink_list *idTable;
|
||||
dlink_list *resvTable;
|
||||
dlink_list *hostTable;
|
||||
rb_dlink_list *clientTable;
|
||||
rb_dlink_list *channelTable;
|
||||
rb_dlink_list *idTable;
|
||||
rb_dlink_list *resvTable;
|
||||
rb_dlink_list *hostTable;
|
||||
|
||||
/*
|
||||
* look in whowas.c for the missing ...[WW_MAX]; entry
|
||||
|
@ -91,11 +91,11 @@ dlink_list *hostTable;
|
|||
void
|
||||
init_hash(void)
|
||||
{
|
||||
clientTable = MyMalloc(sizeof(dlink_list) * U_MAX);
|
||||
idTable = MyMalloc(sizeof(dlink_list) * U_MAX);
|
||||
channelTable = MyMalloc(sizeof(dlink_list) * CH_MAX);
|
||||
hostTable = MyMalloc(sizeof(dlink_list) * HOST_MAX);
|
||||
resvTable = MyMalloc(sizeof(dlink_list) * R_MAX);
|
||||
clientTable = MyMalloc(sizeof(rb_dlink_list) * U_MAX);
|
||||
idTable = MyMalloc(sizeof(rb_dlink_list) * U_MAX);
|
||||
channelTable = MyMalloc(sizeof(rb_dlink_list) * CH_MAX);
|
||||
hostTable = MyMalloc(sizeof(rb_dlink_list) * HOST_MAX);
|
||||
resvTable = MyMalloc(sizeof(rb_dlink_list) * R_MAX);
|
||||
}
|
||||
|
||||
#ifndef RICER_HASHING
|
||||
|
@ -224,7 +224,7 @@ add_to_id_hash(const char *name, struct Client *client_p)
|
|||
return;
|
||||
|
||||
hashv = hash_id(name);
|
||||
dlinkAddAlloc(client_p, &idTable[hashv]);
|
||||
rb_dlinkAddAlloc(client_p, &idTable[hashv]);
|
||||
}
|
||||
|
||||
/* add_to_client_hash()
|
||||
|
@ -242,7 +242,7 @@ add_to_client_hash(const char *name, struct Client *client_p)
|
|||
return;
|
||||
|
||||
hashv = hash_nick(name);
|
||||
dlinkAddAlloc(client_p, &clientTable[hashv]);
|
||||
rb_dlinkAddAlloc(client_p, &clientTable[hashv]);
|
||||
}
|
||||
|
||||
/* add_to_hostname_hash()
|
||||
|
@ -260,7 +260,7 @@ add_to_hostname_hash(const char *hostname, struct Client *client_p)
|
|||
return;
|
||||
|
||||
hashv = hash_hostname(hostname);
|
||||
dlinkAddAlloc(client_p, &hostTable[hashv]);
|
||||
rb_dlinkAddAlloc(client_p, &hostTable[hashv]);
|
||||
}
|
||||
|
||||
/* add_to_resv_hash()
|
||||
|
@ -278,7 +278,7 @@ add_to_resv_hash(const char *name, struct ConfItem *aconf)
|
|||
return;
|
||||
|
||||
hashv = hash_resv(name);
|
||||
dlinkAddAlloc(aconf, &resvTable[hashv]);
|
||||
rb_dlinkAddAlloc(aconf, &resvTable[hashv]);
|
||||
}
|
||||
|
||||
/* del_from_id_hash()
|
||||
|
@ -296,7 +296,7 @@ del_from_id_hash(const char *id, struct Client *client_p)
|
|||
return;
|
||||
|
||||
hashv = hash_id(id);
|
||||
dlinkFindDestroy(client_p, &idTable[hashv]);
|
||||
rb_dlinkFindDestroy(client_p, &idTable[hashv]);
|
||||
}
|
||||
|
||||
/* del_from_client_hash()
|
||||
|
@ -315,7 +315,7 @@ del_from_client_hash(const char *name, struct Client *client_p)
|
|||
return;
|
||||
|
||||
hashv = hash_nick(name);
|
||||
dlinkFindDestroy(client_p, &clientTable[hashv]);
|
||||
rb_dlinkFindDestroy(client_p, &clientTable[hashv]);
|
||||
}
|
||||
|
||||
/* del_from_channel_hash()
|
||||
|
@ -334,7 +334,7 @@ del_from_channel_hash(const char *name, struct Channel *chptr)
|
|||
return;
|
||||
|
||||
hashv = hash_channel(name);
|
||||
dlinkFindDestroy(chptr, &channelTable[hashv]);
|
||||
rb_dlinkFindDestroy(chptr, &channelTable[hashv]);
|
||||
}
|
||||
|
||||
/* del_from_hostname_hash()
|
||||
|
@ -351,7 +351,7 @@ del_from_hostname_hash(const char *hostname, struct Client *client_p)
|
|||
|
||||
hashv = hash_hostname(hostname);
|
||||
|
||||
dlinkFindDestroy(client_p, &hostTable[hashv]);
|
||||
rb_dlinkFindDestroy(client_p, &hostTable[hashv]);
|
||||
}
|
||||
|
||||
/* del_from_resv_hash()
|
||||
|
@ -370,7 +370,7 @@ del_from_resv_hash(const char *name, struct ConfItem *aconf)
|
|||
|
||||
hashv = hash_resv(name);
|
||||
|
||||
dlinkFindDestroy(aconf, &resvTable[hashv]);
|
||||
rb_dlinkFindDestroy(aconf, &resvTable[hashv]);
|
||||
}
|
||||
|
||||
/* find_id()
|
||||
|
@ -381,7 +381,7 @@ struct Client *
|
|||
find_id(const char *name)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
|
||||
if(EmptyString(name))
|
||||
|
@ -408,7 +408,7 @@ struct Client *
|
|||
find_client(const char *name)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
|
||||
s_assert(name != NULL);
|
||||
|
@ -440,7 +440,7 @@ struct Client *
|
|||
find_named_client(const char *name)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
|
||||
s_assert(name != NULL);
|
||||
|
@ -468,7 +468,7 @@ struct Client *
|
|||
find_server(struct Client *source_p, const char *name)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
|
||||
if(EmptyString(name))
|
||||
|
@ -497,11 +497,11 @@ find_server(struct Client *source_p, const char *name)
|
|||
|
||||
/* find_hostname()
|
||||
*
|
||||
* finds a hostname dlink list from the hostname hash table.
|
||||
* we return the full dlink list, because you can have multiple
|
||||
* finds a hostname rb_dlink list from the hostname hash table.
|
||||
* we return the full rb_dlink list, because you can have multiple
|
||||
* entries with the same hostname
|
||||
*/
|
||||
dlink_node *
|
||||
rb_dlink_node *
|
||||
find_hostname(const char *hostname)
|
||||
{
|
||||
unsigned int hashv;
|
||||
|
@ -522,7 +522,7 @@ struct Channel *
|
|||
find_channel(const char *name)
|
||||
{
|
||||
struct Channel *chptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
|
||||
s_assert(name != NULL);
|
||||
|
@ -557,7 +557,7 @@ struct Channel *
|
|||
get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
|
||||
{
|
||||
struct Channel *chptr;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
int len;
|
||||
const char *s = chname;
|
||||
|
@ -600,11 +600,11 @@ get_or_create_channel(struct Client *client_p, const char *chname, int *isnew)
|
|||
|
||||
chptr = allocate_channel(s);
|
||||
|
||||
dlinkAdd(chptr, &chptr->node, &global_channel_list);
|
||||
rb_dlinkAdd(chptr, &chptr->node, &global_channel_list);
|
||||
|
||||
chptr->channelts = CurrentTime; /* doesn't hurt to set it here */
|
||||
|
||||
dlinkAddAlloc(chptr, &channelTable[hashv]);
|
||||
rb_dlinkAddAlloc(chptr, &channelTable[hashv]);
|
||||
|
||||
return chptr;
|
||||
}
|
||||
|
@ -617,7 +617,7 @@ struct ConfItem *
|
|||
hash_find_resv(const char *name)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
unsigned int hashv;
|
||||
|
||||
s_assert(name != NULL);
|
||||
|
@ -644,8 +644,8 @@ void
|
|||
clear_resv_hash(void)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
int i;
|
||||
|
||||
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
|
||||
|
@ -657,7 +657,7 @@ clear_resv_hash(void)
|
|||
continue;
|
||||
|
||||
free_conf(ptr->data);
|
||||
dlinkDestroy(ptr, &resvTable[i]);
|
||||
rb_dlinkDestroy(ptr, &resvTable[i]);
|
||||
}
|
||||
HASH_WALK_END
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ output_hash(struct Client *source_p, const char *name, int length, int *counts,
|
|||
|
||||
|
||||
static void
|
||||
count_hash(struct Client *source_p, dlink_list *table, int length, const char *name)
|
||||
count_hash(struct Client *source_p, rb_dlink_list *table, int length, const char *name)
|
||||
{
|
||||
int counts[11];
|
||||
int deepest = 0;
|
||||
|
@ -708,13 +708,13 @@ count_hash(struct Client *source_p, dlink_list *table, int length, const char *n
|
|||
|
||||
for(i = 0; i < length; i++)
|
||||
{
|
||||
if(dlink_list_length(&table[i]) >= 10)
|
||||
if(rb_dlink_list_length(&table[i]) >= 10)
|
||||
counts[10]++;
|
||||
else
|
||||
counts[dlink_list_length(&table[i])]++;
|
||||
counts[rb_dlink_list_length(&table[i])]++;
|
||||
|
||||
if(dlink_list_length(&table[i]) > deepest)
|
||||
deepest = dlink_list_length(&table[i]);
|
||||
if(rb_dlink_list_length(&table[i]) > deepest)
|
||||
deepest = rb_dlink_list_length(&table[i]);
|
||||
}
|
||||
|
||||
output_hash(source_p, name, length, counts, deepest);
|
||||
|
|
|
@ -176,7 +176,7 @@ add_hook(const char *name, hookfn fn)
|
|||
|
||||
i = register_hook(name);
|
||||
|
||||
dlinkAddAlloc(fn, &hooks[i].hooks);
|
||||
rb_dlinkAddAlloc(fn, &hooks[i].hooks);
|
||||
}
|
||||
|
||||
/* remove_hook()
|
||||
|
@ -190,7 +190,7 @@ remove_hook(const char *name, hookfn fn)
|
|||
if((i = find_hook(name)) < 0)
|
||||
return;
|
||||
|
||||
dlinkFindDestroy(fn, &hooks[i].hooks);
|
||||
rb_dlinkFindDestroy(fn, &hooks[i].hooks);
|
||||
}
|
||||
|
||||
/* call_hook()
|
||||
|
@ -200,7 +200,7 @@ void
|
|||
call_hook(int id, void *arg)
|
||||
{
|
||||
hookfn fn;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
/* The ID we were passed is the position in the hook table of this
|
||||
* hook
|
||||
|
|
|
@ -497,7 +497,7 @@ main(int argc, char *argv[])
|
|||
memset(&local_oper_list, 0, sizeof(local_oper_list));
|
||||
memset(&oper_list, 0, sizeof(oper_list));
|
||||
|
||||
dlinkAddTail(&me, &me.node, &global_client_list);
|
||||
rb_dlinkAddTail(&me, &me.node, &global_client_list);
|
||||
|
||||
memset((void *) &Count, 0, sizeof(Count));
|
||||
memset((void *) &ServerInfo, 0, sizeof(ServerInfo));
|
||||
|
@ -649,7 +649,7 @@ main(int argc, char *argv[])
|
|||
add_to_id_hash(me.id, &me);
|
||||
me.serv->nameinfo = scache_connect(me.name, me.info, 0);
|
||||
|
||||
dlinkAddAlloc(&me, &global_serv_list);
|
||||
rb_dlinkAddAlloc(&me, &global_serv_list);
|
||||
|
||||
construct_umodebuf();
|
||||
|
||||
|
|
|
@ -83,15 +83,15 @@
|
|||
#include "patchlevel.h"
|
||||
#include "serno.h"
|
||||
|
||||
dlink_list lclient_list = { NULL, NULL, 0 };
|
||||
dlink_list global_client_list = { NULL, NULL, 0 };
|
||||
dlink_list global_channel_list = { NULL, NULL, 0 };
|
||||
rb_dlink_list lclient_list = { NULL, NULL, 0 };
|
||||
rb_dlink_list global_client_list = { NULL, NULL, 0 };
|
||||
rb_dlink_list global_channel_list = { NULL, NULL, 0 };
|
||||
|
||||
dlink_list unknown_list; /* unknown clients ON this server only */
|
||||
dlink_list serv_list; /* local servers to this server ONLY */
|
||||
dlink_list global_serv_list; /* global servers on the network */
|
||||
dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
|
||||
dlink_list oper_list; /* network opers */
|
||||
rb_dlink_list unknown_list; /* unknown clients ON this server only */
|
||||
rb_dlink_list serv_list; /* local servers to this server ONLY */
|
||||
rb_dlink_list global_serv_list; /* global servers on the network */
|
||||
rb_dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
|
||||
rb_dlink_list oper_list; /* network opers */
|
||||
|
||||
/* /quote set variables */
|
||||
struct SetOptions GlobalSetOptions;
|
||||
|
|
|
@ -199,7 +199,7 @@ parse_x_file(FILE * file)
|
|||
DupString(aconf->name, gecos_field);
|
||||
DupString(aconf->passwd, reason_field);
|
||||
|
||||
dlinkAddAlloc(aconf, &xline_conf_list);
|
||||
rb_dlinkAddAlloc(aconf, &xline_conf_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ parse_resv_file(FILE * file)
|
|||
|
||||
DupString(aconf->name, host_field);
|
||||
DupString(aconf->passwd, reason_field);
|
||||
dlinkAddAlloc(aconf, &resv_conf_list);
|
||||
rb_dlinkAddAlloc(aconf, &resv_conf_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ static const char *core_module_table[] = {
|
|||
int num_mods = 0;
|
||||
int max_mods = MODS_INCREMENT;
|
||||
|
||||
static dlink_list mod_paths;
|
||||
static rb_dlink_list mod_paths;
|
||||
|
||||
static int mo_modload(struct Client *, struct Client *, int, const char **);
|
||||
static int mo_modlist(struct Client *, struct Client *, int, const char **);
|
||||
|
@ -138,7 +138,7 @@ modules_init(void)
|
|||
static struct module_path *
|
||||
mod_find_path(const char *path)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct module_path *mpath;
|
||||
|
||||
DLINK_FOREACH(ptr, mod_paths.head)
|
||||
|
@ -169,7 +169,7 @@ mod_add_path(const char *path)
|
|||
pathst = MyMalloc(sizeof(struct module_path));
|
||||
|
||||
strcpy(pathst->path, path);
|
||||
dlinkAddAlloc(pathst, &mod_paths);
|
||||
rb_dlinkAddAlloc(pathst, &mod_paths);
|
||||
}
|
||||
|
||||
/* mod_clear_paths()
|
||||
|
@ -181,12 +181,12 @@ mod_add_path(const char *path)
|
|||
void
|
||||
mod_clear_paths(void)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, mod_paths.head)
|
||||
{
|
||||
MyFree(ptr->data);
|
||||
free_dlink_node(ptr);
|
||||
free_rb_dlink_node(ptr);
|
||||
}
|
||||
|
||||
mod_paths.head = mod_paths.tail = NULL;
|
||||
|
@ -313,7 +313,7 @@ int
|
|||
load_one_module(const char *path, int coremodule)
|
||||
{
|
||||
char modpath[MAXPATHLEN];
|
||||
dlink_node *pathst;
|
||||
rb_dlink_node *pathst;
|
||||
struct module_path *mpath;
|
||||
|
||||
struct stat statbuf;
|
||||
|
|
|
@ -133,7 +133,7 @@ void
|
|||
clear_monitor(struct Client *client_p)
|
||||
{
|
||||
struct monitor *monptr;
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->monitor_list.head)
|
||||
{
|
||||
|
@ -142,8 +142,8 @@ clear_monitor(struct Client *client_p)
|
|||
/* we leave the actual entry around with no users, itll be
|
||||
* cleaned up periodically by cleanup_monitor() --anfl
|
||||
*/
|
||||
dlinkFindDestroy(client_p, &monptr->users);
|
||||
free_dlink_node(ptr);
|
||||
rb_dlinkFindDestroy(client_p, &monptr->users);
|
||||
free_rb_dlink_node(ptr);
|
||||
}
|
||||
|
||||
client_p->localClient->monitor_list.head = client_p->localClient->monitor_list.tail = NULL;
|
||||
|
@ -164,7 +164,7 @@ cleanup_monitor(void *unused)
|
|||
{
|
||||
next_ptr = ptr->hnext;
|
||||
|
||||
if(!dlink_list_length(&ptr->users))
|
||||
if(!rb_dlink_list_length(&ptr->users))
|
||||
{
|
||||
if(last_ptr)
|
||||
last_ptr->hnext = next_ptr;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
struct TopConf *conf_cur_block;
|
||||
static char *conf_cur_block_name;
|
||||
|
||||
static dlink_list conf_items;
|
||||
static rb_dlink_list conf_items;
|
||||
|
||||
static struct ConfItem *yy_aconf = NULL;
|
||||
|
||||
|
@ -46,10 +46,10 @@ static struct Class *yy_class = NULL;
|
|||
static struct remote_conf *yy_shared = NULL;
|
||||
static struct server_conf *yy_server = NULL;
|
||||
|
||||
static dlink_list yy_aconf_list;
|
||||
static dlink_list yy_oper_list;
|
||||
static dlink_list yy_shared_list;
|
||||
static dlink_list yy_cluster_list;
|
||||
static rb_dlink_list yy_aconf_list;
|
||||
static rb_dlink_list yy_oper_list;
|
||||
static rb_dlink_list yy_shared_list;
|
||||
static rb_dlink_list yy_cluster_list;
|
||||
static struct oper_conf *yy_oper = NULL;
|
||||
|
||||
static struct alias_entry *yy_alias = NULL;
|
||||
|
@ -90,14 +90,14 @@ add_top_conf(const char *name, int (*sfunc) (struct TopConf *),
|
|||
tc->tc_efunc = efunc;
|
||||
tc->tc_entries = items;
|
||||
|
||||
dlinkAddAlloc(tc, &conf_items);
|
||||
rb_dlinkAddAlloc(tc, &conf_items);
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct TopConf *
|
||||
find_top_conf(const char *name)
|
||||
{
|
||||
dlink_node *d;
|
||||
rb_dlink_node *d;
|
||||
struct TopConf *tc;
|
||||
|
||||
DLINK_FOREACH(d, conf_items.head)
|
||||
|
@ -115,7 +115,7 @@ struct ConfEntry *
|
|||
find_conf_item(const struct TopConf *top, const char *name)
|
||||
{
|
||||
struct ConfEntry *cf;
|
||||
dlink_node *d;
|
||||
rb_dlink_node *d;
|
||||
|
||||
if(top->tc_entries)
|
||||
{
|
||||
|
@ -144,15 +144,15 @@ int
|
|||
remove_top_conf(char *name)
|
||||
{
|
||||
struct TopConf *tc;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
if((tc = find_top_conf(name)) == NULL)
|
||||
return -1;
|
||||
|
||||
if((ptr = dlinkFind(tc, &conf_items)) == NULL)
|
||||
if((ptr = rb_dlinkFind(tc, &conf_items)) == NULL)
|
||||
return -1;
|
||||
|
||||
dlinkDestroy(ptr, &conf_items);
|
||||
rb_dlinkDestroy(ptr, &conf_items);
|
||||
MyFree(tc);
|
||||
|
||||
return 0;
|
||||
|
@ -451,8 +451,8 @@ set_modes_from_table(int *modes, const char *whatis, struct mode_table *tab, con
|
|||
static int
|
||||
conf_begin_oper(struct TopConf *tc)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
if(yy_oper != NULL)
|
||||
{
|
||||
|
@ -463,7 +463,7 @@ conf_begin_oper(struct TopConf *tc)
|
|||
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_oper_list.head)
|
||||
{
|
||||
free_oper_conf(ptr->data);
|
||||
dlinkDestroy(ptr, &yy_oper_list);
|
||||
rb_dlinkDestroy(ptr, &yy_oper_list);
|
||||
}
|
||||
|
||||
yy_oper = make_oper_conf();
|
||||
|
@ -476,8 +476,8 @@ static int
|
|||
conf_end_oper(struct TopConf *tc)
|
||||
{
|
||||
struct oper_conf *yy_tmpoper;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
if(conf_cur_block_name != NULL)
|
||||
{
|
||||
|
@ -552,7 +552,7 @@ conf_end_oper(struct TopConf *tc)
|
|||
#endif
|
||||
|
||||
/* all is ok, put it on oper_conf_list */
|
||||
dlinkMoveNode(ptr, &yy_oper_list, &oper_conf_list);
|
||||
rb_dlinkMoveNode(ptr, &yy_oper_list, &oper_conf_list);
|
||||
}
|
||||
|
||||
free_oper_conf(yy_oper);
|
||||
|
@ -599,7 +599,7 @@ conf_set_oper_user(void *data)
|
|||
return;
|
||||
}
|
||||
|
||||
dlinkAddAlloc(yy_tmpoper, &yy_oper_list);
|
||||
rb_dlinkAddAlloc(yy_tmpoper, &yy_oper_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -793,8 +793,8 @@ conf_set_listen_address(void *data)
|
|||
static int
|
||||
conf_begin_auth(struct TopConf *tc)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
if(yy_aconf)
|
||||
free_conf(yy_aconf);
|
||||
|
@ -802,7 +802,7 @@ conf_begin_auth(struct TopConf *tc)
|
|||
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_aconf_list.head)
|
||||
{
|
||||
free_conf(ptr->data);
|
||||
dlinkDestroy(ptr, &yy_aconf_list);
|
||||
rb_dlinkDestroy(ptr, &yy_aconf_list);
|
||||
}
|
||||
|
||||
yy_aconf = make_conf();
|
||||
|
@ -815,8 +815,8 @@ static int
|
|||
conf_end_auth(struct TopConf *tc)
|
||||
{
|
||||
struct ConfItem *yy_tmp;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
if(EmptyString(yy_aconf->name))
|
||||
DupString(yy_aconf->name, "NOMATCH");
|
||||
|
@ -856,7 +856,7 @@ conf_end_auth(struct TopConf *tc)
|
|||
conf_add_class_to_conf(yy_tmp);
|
||||
|
||||
add_conf_by_address(yy_tmp->host, CONF_CLIENT, yy_tmp->user, yy_tmp);
|
||||
dlinkDestroy(ptr, &yy_aconf_list);
|
||||
rb_dlinkDestroy(ptr, &yy_aconf_list);
|
||||
}
|
||||
|
||||
yy_aconf = NULL;
|
||||
|
@ -892,7 +892,7 @@ conf_set_auth_user(void *data)
|
|||
}
|
||||
|
||||
if(yy_aconf != yy_tmp)
|
||||
dlinkAddAlloc(yy_tmp, &yy_aconf_list);
|
||||
rb_dlinkAddAlloc(yy_tmp, &yy_aconf_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1004,12 +1004,12 @@ conf_set_auth_class(void *data)
|
|||
static int
|
||||
conf_cleanup_shared(struct TopConf *tc)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_shared_list.head)
|
||||
{
|
||||
free_remote_conf(ptr->data);
|
||||
dlinkDestroy(ptr, &yy_shared_list);
|
||||
rb_dlinkDestroy(ptr, &yy_shared_list);
|
||||
}
|
||||
|
||||
if(yy_shared != NULL)
|
||||
|
@ -1072,7 +1072,7 @@ conf_set_shared_oper(void *data)
|
|||
else
|
||||
DupString(yy_shared->username, username);
|
||||
|
||||
dlinkAddAlloc(yy_shared, &yy_shared_list);
|
||||
rb_dlinkAddAlloc(yy_shared, &yy_shared_list);
|
||||
yy_shared = NULL;
|
||||
}
|
||||
|
||||
|
@ -1081,7 +1081,7 @@ conf_set_shared_flags(void *data)
|
|||
{
|
||||
conf_parm_t *args = data;
|
||||
int flags = 0;
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
if(yy_shared != NULL)
|
||||
free_remote_conf(yy_shared);
|
||||
|
@ -1093,8 +1093,8 @@ conf_set_shared_flags(void *data)
|
|||
yy_shared = ptr->data;
|
||||
|
||||
yy_shared->flags = flags;
|
||||
dlinkDestroy(ptr, &yy_shared_list);
|
||||
dlinkAddTail(yy_shared, &yy_shared->node, &shared_conf_list);
|
||||
rb_dlinkDestroy(ptr, &yy_shared_list);
|
||||
rb_dlinkAddTail(yy_shared, &yy_shared->node, &shared_conf_list);
|
||||
}
|
||||
|
||||
yy_shared = NULL;
|
||||
|
@ -1155,7 +1155,7 @@ conf_end_connect(struct TopConf *tc)
|
|||
#endif
|
||||
|
||||
add_server_conf(yy_server);
|
||||
dlinkAdd(yy_server, &yy_server->node, &server_conf_list);
|
||||
rb_dlinkAdd(yy_server, &yy_server->node, &server_conf_list);
|
||||
|
||||
yy_server = NULL;
|
||||
return 0;
|
||||
|
@ -1256,7 +1256,7 @@ conf_set_connect_hub_mask(void *data)
|
|||
|
||||
DupString(yy_hub->host, data);
|
||||
DupString(yy_hub->server, yy_server->name);
|
||||
dlinkAdd(yy_hub, &yy_hub->node, &hubleaf_conf_list);
|
||||
rb_dlinkAdd(yy_hub, &yy_hub->node, &hubleaf_conf_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1272,7 +1272,7 @@ conf_set_connect_leaf_mask(void *data)
|
|||
|
||||
DupString(yy_leaf->host, data);
|
||||
DupString(yy_leaf->server, yy_server->name);
|
||||
dlinkAdd(yy_leaf, &yy_leaf->node, &hubleaf_conf_list);
|
||||
rb_dlinkAdd(yy_leaf, &yy_leaf->node, &hubleaf_conf_list);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1303,12 +1303,12 @@ conf_set_exempt_ip(void *data)
|
|||
static int
|
||||
conf_cleanup_cluster(struct TopConf *tc)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, yy_cluster_list.head)
|
||||
{
|
||||
free_remote_conf(ptr->data);
|
||||
dlinkDestroy(ptr, &yy_cluster_list);
|
||||
rb_dlinkDestroy(ptr, &yy_cluster_list);
|
||||
}
|
||||
|
||||
if(yy_shared != NULL)
|
||||
|
@ -1328,7 +1328,7 @@ conf_set_cluster_name(void *data)
|
|||
|
||||
yy_shared = make_remote_conf();
|
||||
DupString(yy_shared->server, data);
|
||||
dlinkAddAlloc(yy_shared, &yy_cluster_list);
|
||||
rb_dlinkAddAlloc(yy_shared, &yy_cluster_list);
|
||||
|
||||
yy_shared = NULL;
|
||||
}
|
||||
|
@ -1338,7 +1338,7 @@ conf_set_cluster_flags(void *data)
|
|||
{
|
||||
conf_parm_t *args = data;
|
||||
int flags = 0;
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
if(yy_shared != NULL)
|
||||
free_remote_conf(yy_shared);
|
||||
|
@ -1349,8 +1349,8 @@ conf_set_cluster_flags(void *data)
|
|||
{
|
||||
yy_shared = ptr->data;
|
||||
yy_shared->flags = flags;
|
||||
dlinkAddTail(yy_shared, &yy_shared->node, &cluster_conf_list);
|
||||
dlinkDestroy(ptr, &yy_cluster_list);
|
||||
rb_dlinkAddTail(yy_shared, &yy_shared->node, &cluster_conf_list);
|
||||
rb_dlinkDestroy(ptr, &yy_cluster_list);
|
||||
}
|
||||
|
||||
yy_shared = NULL;
|
||||
|
@ -1537,7 +1537,7 @@ static int
|
|||
conf_begin_service(struct TopConf *tc)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, global_serv_list.head)
|
||||
{
|
||||
|
@ -1576,7 +1576,7 @@ conf_set_service_name(void *data)
|
|||
}
|
||||
|
||||
DupString(tmp, data);
|
||||
dlinkAddAlloc(tmp, &service_list);
|
||||
rb_dlinkAddAlloc(tmp, &service_list);
|
||||
|
||||
if((target_p = find_server(NULL, tmp)))
|
||||
target_p->flags |= FLAGS_SERVICE;
|
||||
|
@ -1856,7 +1856,7 @@ add_conf_item(const char *topconf, const char *name, int type, void (*func) (voi
|
|||
cf->cf_func = func;
|
||||
cf->cf_arg = NULL;
|
||||
|
||||
dlinkAddAlloc(cf, &tc->tc_items);
|
||||
rb_dlinkAddAlloc(cf, &tc->tc_items);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1866,7 +1866,7 @@ remove_conf_item(const char *topconf, const char *name)
|
|||
{
|
||||
struct TopConf *tc;
|
||||
struct ConfEntry *cf;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
if((tc = find_top_conf(topconf)) == NULL)
|
||||
return -1;
|
||||
|
@ -1874,10 +1874,10 @@ remove_conf_item(const char *topconf, const char *name)
|
|||
if((cf = find_conf_item(tc, name)) == NULL)
|
||||
return -1;
|
||||
|
||||
if((ptr = dlinkFind(cf, &tc->tc_items)) == NULL)
|
||||
if((ptr = rb_dlinkFind(cf, &tc->tc_items)) == NULL)
|
||||
return -1;
|
||||
|
||||
dlinkDestroy(ptr, &tc->tc_items);
|
||||
rb_dlinkDestroy(ptr, &tc->tc_items);
|
||||
MyFree(cf);
|
||||
|
||||
return 0;
|
||||
|
|
30
src/reject.c
30
src/reject.c
|
@ -36,14 +36,14 @@
|
|||
#include "hash.h"
|
||||
|
||||
static patricia_tree_t *reject_tree;
|
||||
dlink_list delay_exit;
|
||||
static dlink_list reject_list;
|
||||
rb_dlink_list delay_exit;
|
||||
static rb_dlink_list reject_list;
|
||||
|
||||
static patricia_tree_t *unknown_tree;
|
||||
|
||||
struct reject_data
|
||||
{
|
||||
dlink_node rnode;
|
||||
rb_dlink_node rnode;
|
||||
time_t time;
|
||||
unsigned int count;
|
||||
uint32_t mask_hashv;
|
||||
|
@ -55,7 +55,7 @@ static void
|
|||
reject_exit(void *unused)
|
||||
{
|
||||
struct Client *client_p;
|
||||
dlink_node *ptr, *ptr_next;
|
||||
rb_dlink_node *ptr, *ptr_next;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, ptr_next, delay_exit.head)
|
||||
{
|
||||
|
@ -81,7 +81,7 @@ reject_exit(void *unused)
|
|||
}
|
||||
close_connection(client_p);
|
||||
SetDead(client_p);
|
||||
dlinkAddAlloc(client_p, &dead_list);
|
||||
rb_dlinkAddAlloc(client_p, &dead_list);
|
||||
}
|
||||
|
||||
delay_exit.head = delay_exit.tail = NULL;
|
||||
|
@ -91,7 +91,7 @@ reject_exit(void *unused)
|
|||
static void
|
||||
reject_expires(void *unused)
|
||||
{
|
||||
dlink_node *ptr, *next;
|
||||
rb_dlink_node *ptr, *next;
|
||||
patricia_node_t *pnode;
|
||||
struct reject_data *rdata;
|
||||
|
||||
|
@ -103,7 +103,7 @@ reject_expires(void *unused)
|
|||
if(rdata->time + ConfigFileEntry.reject_duration > CurrentTime)
|
||||
continue;
|
||||
|
||||
dlinkDelete(ptr, &reject_list);
|
||||
rb_dlinkDelete(ptr, &reject_list);
|
||||
MyFree(rdata);
|
||||
patricia_remove(reject_tree, pnode);
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ add_reject(struct Client *client_p, const char *mask1, const char *mask2)
|
|||
#endif
|
||||
pnode = make_and_lookup_ip(reject_tree, (struct sockaddr *)&client_p->localClient->ip, bitlen);
|
||||
pnode->data = rdata = MyMalloc(sizeof(struct reject_data));
|
||||
dlinkAddTail(pnode, &rdata->rnode, &reject_list);
|
||||
rb_dlinkAddTail(pnode, &rdata->rnode, &reject_list);
|
||||
rdata->time = CurrentTime;
|
||||
rdata->count = 1;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ check_reject(struct Client *client_p)
|
|||
SetReject(client_p);
|
||||
rb_setselect(client_p->localClient->F->fd, FDLIST_NONE, COMM_SELECT_WRITE | COMM_SELECT_READ, NULL, NULL, 0);
|
||||
SetClosing(client_p);
|
||||
dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &delay_exit);
|
||||
rb_dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &delay_exit);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ check_reject(struct Client *client_p)
|
|||
void
|
||||
flush_reject(void)
|
||||
{
|
||||
dlink_node *ptr, *next;
|
||||
rb_dlink_node *ptr, *next;
|
||||
patricia_node_t *pnode;
|
||||
struct reject_data *rdata;
|
||||
|
||||
|
@ -200,7 +200,7 @@ flush_reject(void)
|
|||
{
|
||||
pnode = ptr->data;
|
||||
rdata = pnode->data;
|
||||
dlinkDelete(ptr, &reject_list);
|
||||
rb_dlinkDelete(ptr, &reject_list);
|
||||
MyFree(rdata);
|
||||
patricia_remove(reject_tree, pnode);
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ remove_reject_ip(const char *ip)
|
|||
if((pnode = match_string(reject_tree, ip)) != NULL)
|
||||
{
|
||||
struct reject_data *rdata = pnode->data;
|
||||
dlinkDelete(&rdata->rnode, &reject_list);
|
||||
rb_dlinkDelete(&rdata->rnode, &reject_list);
|
||||
MyFree(rdata);
|
||||
patricia_remove(reject_tree, pnode);
|
||||
return 1;
|
||||
|
@ -230,7 +230,7 @@ remove_reject_ip(const char *ip)
|
|||
int
|
||||
remove_reject_mask(const char *mask1, const char *mask2)
|
||||
{
|
||||
dlink_node *ptr, *next;
|
||||
rb_dlink_node *ptr, *next;
|
||||
patricia_node_t *pnode;
|
||||
struct reject_data *rdata;
|
||||
uint32_t hashv;
|
||||
|
@ -247,7 +247,7 @@ remove_reject_mask(const char *mask1, const char *mask2)
|
|||
rdata = pnode->data;
|
||||
if (rdata->mask_hashv == hashv)
|
||||
{
|
||||
dlinkDelete(ptr, &reject_list);
|
||||
rb_dlinkDelete(ptr, &reject_list);
|
||||
MyFree(rdata);
|
||||
patricia_remove(reject_tree, pnode);
|
||||
n++;
|
||||
|
@ -279,7 +279,7 @@ add_unknown_ip(struct Client *client_p)
|
|||
SetReject(client_p);
|
||||
rb_setselect(client_p->localClient->F->fd, FDLIST_NONE, COMM_SELECT_WRITE | COMM_SELECT_READ, NULL, NULL, 0);
|
||||
SetClosing(client_p);
|
||||
dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &delay_exit);
|
||||
rb_dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &delay_exit);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
18
src/res.c
18
src/res.c
|
@ -70,7 +70,7 @@ typedef enum
|
|||
|
||||
struct reslist
|
||||
{
|
||||
dlink_node node;
|
||||
rb_dlink_node node;
|
||||
int id;
|
||||
int sent; /* number of requests sent */
|
||||
request_state state; /* State the resolver machine is in */
|
||||
|
@ -88,7 +88,7 @@ struct reslist
|
|||
};
|
||||
|
||||
static int res_fd;
|
||||
static dlink_list request_list = { NULL, NULL, 0 };
|
||||
static rb_dlink_list request_list = { NULL, NULL, 0 };
|
||||
|
||||
static void rem_request(struct reslist *request);
|
||||
static struct reslist *make_request(struct DNSQuery *query);
|
||||
|
@ -174,8 +174,8 @@ static int res_ourserver(const struct irc_sockaddr_storage *inp)
|
|||
*/
|
||||
static time_t timeout_query_list(time_t now)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
struct reslist *request;
|
||||
time_t next_time = 0;
|
||||
time_t timeout = 0;
|
||||
|
@ -289,7 +289,7 @@ void add_local_domain(char *hname, size_t size)
|
|||
*/
|
||||
static void rem_request(struct reslist *request)
|
||||
{
|
||||
dlinkDelete(&request->node, &request_list);
|
||||
rb_dlinkDelete(&request->node, &request_list);
|
||||
MyFree(request->name);
|
||||
MyFree(request);
|
||||
}
|
||||
|
@ -308,7 +308,7 @@ static struct reslist *make_request(struct DNSQuery *query)
|
|||
request->query = query;
|
||||
request->state = REQ_IDLE;
|
||||
|
||||
dlinkAdd(request, &request->node, &request_list);
|
||||
rb_dlinkAdd(request, &request->node, &request_list);
|
||||
|
||||
return request;
|
||||
}
|
||||
|
@ -319,8 +319,8 @@ static struct reslist *make_request(struct DNSQuery *query)
|
|||
*/
|
||||
void delete_resolver_queries(const struct DNSQuery *query)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
struct reslist *request;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, request_list.head)
|
||||
|
@ -368,7 +368,7 @@ static int send_res_msg(const char *msg, int len, int rcount)
|
|||
*/
|
||||
static struct reslist *find_id(int id)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct reslist *request;
|
||||
|
||||
DLINK_FOREACH(ptr, request_list.head)
|
||||
|
|
16
src/s_auth.c
16
src/s_auth.c
|
@ -89,7 +89,7 @@ ReportType;
|
|||
|
||||
#define sendheader(c, r) sendto_one_notice(c, HeaderMessages[(r)])
|
||||
|
||||
static dlink_list auth_poll_list;
|
||||
static rb_dlink_list auth_poll_list;
|
||||
static BlockHeap *auth_heap;
|
||||
static EVH timeout_auth_queries_event;
|
||||
|
||||
|
@ -147,7 +147,7 @@ release_auth_client(struct AuthRequest *auth)
|
|||
return;
|
||||
|
||||
client->localClient->auth_request = NULL;
|
||||
dlinkDelete(&auth->node, &auth_poll_list);
|
||||
rb_dlinkDelete(&auth->node, &auth_poll_list);
|
||||
free_auth_request(auth);
|
||||
if(client->localClient->F->fd > highest_fd)
|
||||
highest_fd = client->localClient->F->fd;
|
||||
|
@ -159,7 +159,7 @@ release_auth_client(struct AuthRequest *auth)
|
|||
*/
|
||||
client->localClient->allow_read = MAX_FLOOD;
|
||||
rb_setflush(client->localClient->F->fd, 1000, flood_recalc, client);
|
||||
dlinkAddTail(client, &client->node, &global_client_list);
|
||||
rb_dlinkAddTail(client, &client->node, &global_client_list);
|
||||
read_packet(client->localClient->F->fd, client);
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ auth_dns_callback(void *vptr, struct DNSReply *reply)
|
|||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
"auth_dns_callback(): auth->client->localClient (%s) is NULL", get_client_name(auth->client, HIDE_IP));
|
||||
|
||||
dlinkDelete(&auth->node, &auth_poll_list);
|
||||
rb_dlinkDelete(&auth->node, &auth_poll_list);
|
||||
free_auth_request(auth);
|
||||
|
||||
/* and they will silently drop through and all will hopefully be ok... -nenolod */
|
||||
|
@ -419,7 +419,7 @@ start_auth(struct Client *client)
|
|||
if(ConfigFileEntry.disable_auth == 0)
|
||||
start_auth_query(auth);
|
||||
|
||||
dlinkAdd(auth, &auth->node, &auth_poll_list);
|
||||
rb_dlinkAdd(auth, &auth->node, &auth_poll_list);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -429,8 +429,8 @@ start_auth(struct Client *client)
|
|||
static void
|
||||
timeout_auth_queries_event(void *notused)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
struct AuthRequest *auth;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, auth_poll_list.head)
|
||||
|
@ -613,6 +613,6 @@ delete_auth_queries(struct Client *target_p)
|
|||
if(auth->fd >= 0)
|
||||
rb_close(auth->fd);
|
||||
|
||||
dlinkDelete(&auth->node, &auth_poll_list);
|
||||
rb_dlinkDelete(&auth->node, &auth_poll_list);
|
||||
free_auth_request(auth);
|
||||
}
|
||||
|
|
48
src/s_conf.c
48
src/s_conf.c
|
@ -66,9 +66,9 @@ extern char linebuf[];
|
|||
|
||||
static BlockHeap *confitem_heap = NULL;
|
||||
|
||||
dlink_list temp_klines[LAST_TEMP_TYPE];
|
||||
dlink_list temp_dlines[LAST_TEMP_TYPE];
|
||||
dlink_list service_list;
|
||||
rb_dlink_list temp_klines[LAST_TEMP_TYPE];
|
||||
rb_dlink_list temp_dlines[LAST_TEMP_TYPE];
|
||||
rb_dlink_list service_list;
|
||||
|
||||
/* internally defined functions */
|
||||
static void set_default_conf(void);
|
||||
|
@ -477,7 +477,7 @@ static int
|
|||
attach_iline(struct Client *client_p, struct ConfItem *aconf)
|
||||
{
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
int local_count = 0;
|
||||
int global_count = 0;
|
||||
int ident_count = 0;
|
||||
|
@ -942,22 +942,22 @@ add_temp_kline(struct ConfItem *aconf)
|
|||
{
|
||||
if(aconf->hold >= CurrentTime + (10080 * 60))
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_klines[TEMP_WEEK]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_WEEK]);
|
||||
aconf->port = TEMP_WEEK;
|
||||
}
|
||||
else if(aconf->hold >= CurrentTime + (1440 * 60))
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_klines[TEMP_DAY]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_DAY]);
|
||||
aconf->port = TEMP_DAY;
|
||||
}
|
||||
else if(aconf->hold >= CurrentTime + (60 * 60))
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_klines[TEMP_HOUR]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_HOUR]);
|
||||
aconf->port = TEMP_HOUR;
|
||||
}
|
||||
else
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_klines[TEMP_MIN]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_klines[TEMP_MIN]);
|
||||
aconf->port = TEMP_MIN;
|
||||
}
|
||||
|
||||
|
@ -976,22 +976,22 @@ add_temp_dline(struct ConfItem *aconf)
|
|||
{
|
||||
if(aconf->hold >= CurrentTime + (10080 * 60))
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_dlines[TEMP_WEEK]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_WEEK]);
|
||||
aconf->port = TEMP_WEEK;
|
||||
}
|
||||
else if(aconf->hold >= CurrentTime + (1440 * 60))
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_dlines[TEMP_DAY]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_DAY]);
|
||||
aconf->port = TEMP_DAY;
|
||||
}
|
||||
else if(aconf->hold >= CurrentTime + (60 * 60))
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_dlines[TEMP_HOUR]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_HOUR]);
|
||||
aconf->port = TEMP_HOUR;
|
||||
}
|
||||
else
|
||||
{
|
||||
dlinkAddAlloc(aconf, &temp_dlines[TEMP_MIN]);
|
||||
rb_dlinkAddAlloc(aconf, &temp_dlines[TEMP_MIN]);
|
||||
aconf->port = TEMP_MIN;
|
||||
}
|
||||
|
||||
|
@ -1009,11 +1009,11 @@ add_temp_dline(struct ConfItem *aconf)
|
|||
static void
|
||||
expire_temp_kd(void *list)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
struct ConfItem *aconf;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, ((dlink_list *) list)->head)
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
|
||||
{
|
||||
aconf = ptr->data;
|
||||
|
||||
|
@ -1027,7 +1027,7 @@ expire_temp_kd(void *list)
|
|||
user : "*", (aconf->host) ? aconf->host : "*");
|
||||
|
||||
delete_one_address_conf(aconf->host, aconf);
|
||||
dlinkDestroy(ptr, list);
|
||||
rb_dlinkDestroy(ptr, list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1036,15 +1036,15 @@ static void
|
|||
reorganise_temp_kd(void *list)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, ((dlink_list *) list)->head)
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, ((rb_dlink_list *) list)->head)
|
||||
{
|
||||
aconf = ptr->data;
|
||||
|
||||
if(aconf->hold < (CurrentTime + (60 * 60)))
|
||||
{
|
||||
dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ?
|
||||
rb_dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ?
|
||||
&temp_klines[TEMP_MIN] : &temp_dlines[TEMP_MIN]);
|
||||
aconf->port = TEMP_MIN;
|
||||
}
|
||||
|
@ -1052,14 +1052,14 @@ reorganise_temp_kd(void *list)
|
|||
{
|
||||
if(aconf->hold < (CurrentTime + (1440 * 60)))
|
||||
{
|
||||
dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ?
|
||||
rb_dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ?
|
||||
&temp_klines[TEMP_HOUR] : &temp_dlines[TEMP_HOUR]);
|
||||
aconf->port = TEMP_HOUR;
|
||||
}
|
||||
else if(aconf->port > TEMP_DAY &&
|
||||
(aconf->hold < (CurrentTime + (10080 * 60))))
|
||||
{
|
||||
dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ?
|
||||
rb_dlinkMoveNode(ptr, list, (aconf->status == CONF_KILL) ?
|
||||
&temp_klines[TEMP_DAY] : &temp_dlines[TEMP_DAY]);
|
||||
aconf->port = TEMP_DAY;
|
||||
}
|
||||
|
@ -1214,8 +1214,8 @@ static void
|
|||
clear_out_old_conf(void)
|
||||
{
|
||||
struct Class *cltmp;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
/*
|
||||
* don't delete the class table, rather mark all entries
|
||||
|
@ -1268,7 +1268,7 @@ clear_out_old_conf(void)
|
|||
DLINK_FOREACH_SAFE(ptr, next_ptr, service_list.head)
|
||||
{
|
||||
MyFree(ptr->data);
|
||||
dlinkDestroy(ptr, &service_list);
|
||||
rb_dlinkDestroy(ptr, &service_list);
|
||||
}
|
||||
|
||||
/* remove any aliases... -- nenolod */
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#include "event.h"
|
||||
#include "memory.h"
|
||||
|
||||
dlink_list glines;
|
||||
rb_dlink_list glines;
|
||||
|
||||
static void expire_glines(void);
|
||||
static void expire_pending_glines(void);
|
||||
|
@ -59,7 +59,7 @@ static void expire_pending_glines(void);
|
|||
void
|
||||
add_gline(struct ConfItem *aconf)
|
||||
{
|
||||
dlinkAddTailAlloc(aconf, &glines);
|
||||
rb_dlinkAddTailAlloc(aconf, &glines);
|
||||
add_conf_by_address(aconf->host, CONF_GLINE, aconf->user, aconf);
|
||||
}
|
||||
|
||||
|
@ -73,7 +73,7 @@ add_gline(struct ConfItem *aconf)
|
|||
struct ConfItem *
|
||||
find_is_glined(const char *host, const char *user)
|
||||
{
|
||||
dlink_node *gline_node;
|
||||
rb_dlink_node *gline_node;
|
||||
struct ConfItem *kill_ptr;
|
||||
|
||||
DLINK_FOREACH(gline_node, glines.head)
|
||||
|
@ -116,8 +116,8 @@ cleanup_glines(void *unused)
|
|||
static void
|
||||
expire_glines()
|
||||
{
|
||||
dlink_node *gline_node;
|
||||
dlink_node *next_node;
|
||||
rb_dlink_node *gline_node;
|
||||
rb_dlink_node *next_node;
|
||||
struct ConfItem *kill_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(gline_node, next_node, glines.head)
|
||||
|
@ -128,7 +128,7 @@ expire_glines()
|
|||
if(kill_ptr->hold > CurrentTime)
|
||||
break;
|
||||
|
||||
dlinkDestroy(gline_node, &glines);
|
||||
rb_dlinkDestroy(gline_node, &glines);
|
||||
delete_one_address_conf(kill_ptr->host, kill_ptr);
|
||||
}
|
||||
}
|
||||
|
@ -146,8 +146,8 @@ expire_glines()
|
|||
static void
|
||||
expire_pending_glines()
|
||||
{
|
||||
dlink_node *pending_node;
|
||||
dlink_node *next_node;
|
||||
rb_dlink_node *pending_node;
|
||||
rb_dlink_node *next_node;
|
||||
struct gline_pending *glp_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(pending_node, next_node, pending_glines.head)
|
||||
|
@ -161,7 +161,7 @@ expire_pending_glines()
|
|||
MyFree(glp_ptr->reason1);
|
||||
MyFree(glp_ptr->reason2);
|
||||
MyFree(glp_ptr);
|
||||
dlinkDestroy(pending_node, &pending_glines);
|
||||
rb_dlinkDestroy(pending_node, &pending_glines);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,15 +50,15 @@
|
|||
#include "sprintf_irc.h"
|
||||
#include "irc_dictionary.h"
|
||||
|
||||
dlink_list shared_conf_list;
|
||||
dlink_list cluster_conf_list;
|
||||
dlink_list oper_conf_list;
|
||||
dlink_list hubleaf_conf_list;
|
||||
dlink_list server_conf_list;
|
||||
dlink_list xline_conf_list;
|
||||
dlink_list resv_conf_list; /* nicks only! */
|
||||
dlink_list nd_list; /* nick delay */
|
||||
dlink_list tgchange_list;
|
||||
rb_dlink_list shared_conf_list;
|
||||
rb_dlink_list cluster_conf_list;
|
||||
rb_dlink_list oper_conf_list;
|
||||
rb_dlink_list hubleaf_conf_list;
|
||||
rb_dlink_list server_conf_list;
|
||||
rb_dlink_list xline_conf_list;
|
||||
rb_dlink_list resv_conf_list; /* nicks only! */
|
||||
rb_dlink_list nd_list; /* nick delay */
|
||||
rb_dlink_list tgchange_list;
|
||||
|
||||
patricia_tree_t *tgchange_tree;
|
||||
|
||||
|
@ -80,32 +80,32 @@ void
|
|||
clear_s_newconf(void)
|
||||
{
|
||||
struct server_conf *server_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, shared_conf_list.head)
|
||||
{
|
||||
/* ptr here is ptr->data->node */
|
||||
dlinkDelete(ptr, &shared_conf_list);
|
||||
rb_dlinkDelete(ptr, &shared_conf_list);
|
||||
free_remote_conf(ptr->data);
|
||||
}
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, cluster_conf_list.head)
|
||||
{
|
||||
dlinkDelete(ptr, &cluster_conf_list);
|
||||
rb_dlinkDelete(ptr, &cluster_conf_list);
|
||||
free_remote_conf(ptr->data);
|
||||
}
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, hubleaf_conf_list.head)
|
||||
{
|
||||
dlinkDelete(ptr, &hubleaf_conf_list);
|
||||
rb_dlinkDelete(ptr, &hubleaf_conf_list);
|
||||
free_remote_conf(ptr->data);
|
||||
}
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, oper_conf_list.head)
|
||||
{
|
||||
free_oper_conf(ptr->data);
|
||||
dlinkDestroy(ptr, &oper_conf_list);
|
||||
rb_dlinkDestroy(ptr, &oper_conf_list);
|
||||
}
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, server_conf_list.head)
|
||||
|
@ -114,7 +114,7 @@ clear_s_newconf(void)
|
|||
|
||||
if(!server_p->servers)
|
||||
{
|
||||
dlinkDelete(ptr, &server_conf_list);
|
||||
rb_dlinkDelete(ptr, &server_conf_list);
|
||||
free_server_conf(ptr->data);
|
||||
}
|
||||
else
|
||||
|
@ -126,7 +126,7 @@ void
|
|||
clear_s_newconf_bans(void)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, xline_conf_list.head)
|
||||
{
|
||||
|
@ -136,7 +136,7 @@ clear_s_newconf_bans(void)
|
|||
continue;
|
||||
|
||||
free_conf(aconf);
|
||||
dlinkDestroy(ptr, &xline_conf_list);
|
||||
rb_dlinkDestroy(ptr, &xline_conf_list);
|
||||
}
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, resv_conf_list.head)
|
||||
|
@ -148,7 +148,7 @@ clear_s_newconf_bans(void)
|
|||
continue;
|
||||
|
||||
free_conf(aconf);
|
||||
dlinkDestroy(ptr, &resv_conf_list);
|
||||
rb_dlinkDestroy(ptr, &resv_conf_list);
|
||||
}
|
||||
|
||||
clear_resv_hash();
|
||||
|
@ -179,7 +179,7 @@ find_shared_conf(const char *username, const char *host,
|
|||
const char *server, int flags)
|
||||
{
|
||||
struct remote_conf *shared_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, shared_conf_list.head)
|
||||
{
|
||||
|
@ -225,7 +225,7 @@ cluster_generic(struct Client *source_p, const char *command,
|
|||
char buffer[BUFSIZE];
|
||||
struct remote_conf *shared_p;
|
||||
va_list args;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
va_start(args, format);
|
||||
ircvsnprintf(buffer, sizeof(buffer), format, args);
|
||||
|
@ -288,7 +288,7 @@ find_oper_conf(const char *username, const char *host, const char *locip, const
|
|||
struct irc_sockaddr_storage ip, cip;
|
||||
char addr[HOSTLEN+1];
|
||||
int bits, cbits;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
parse_netmask(locip, (struct sockaddr *)&cip, &cbits);
|
||||
|
||||
|
@ -432,7 +432,7 @@ struct server_conf *
|
|||
find_server_conf(const char *name)
|
||||
{
|
||||
struct server_conf *server_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, server_conf_list.head)
|
||||
{
|
||||
|
@ -485,7 +485,7 @@ detach_server_conf(struct Client *client_p)
|
|||
if(MaxUsers(server_p->class) < 0 && CurrUsers(server_p->class) <= 0)
|
||||
free_class(server_p->class);
|
||||
|
||||
dlinkDelete(&server_p->node, &server_conf_list);
|
||||
rb_dlinkDelete(&server_p->node, &server_conf_list);
|
||||
free_server_conf(server_p);
|
||||
}
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ struct ConfItem *
|
|||
find_xline(const char *gecos, int counter)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, xline_conf_list.head)
|
||||
{
|
||||
|
@ -535,7 +535,7 @@ struct ConfItem *
|
|||
find_xline_mask(const char *gecos)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, xline_conf_list.head)
|
||||
{
|
||||
|
@ -552,7 +552,7 @@ struct ConfItem *
|
|||
find_nick_resv(const char *name)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, resv_conf_list.head)
|
||||
{
|
||||
|
@ -572,7 +572,7 @@ struct ConfItem *
|
|||
find_nick_resv_mask(const char *name)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
DLINK_FOREACH(ptr, resv_conf_list.head)
|
||||
{
|
||||
|
@ -689,8 +689,8 @@ static void
|
|||
expire_temp_rxlines(void *unused)
|
||||
{
|
||||
struct ConfItem *aconf;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
int i;
|
||||
|
||||
HASH_WALK_SAFE(i, R_MAX, ptr, next_ptr, resvTable)
|
||||
|
@ -705,7 +705,7 @@ expire_temp_rxlines(void *unused)
|
|||
aconf->name);
|
||||
|
||||
free_conf(aconf);
|
||||
dlinkDestroy(ptr, &resvTable[i]);
|
||||
rb_dlinkDestroy(ptr, &resvTable[i]);
|
||||
}
|
||||
}
|
||||
HASH_WALK_END
|
||||
|
@ -721,7 +721,7 @@ expire_temp_rxlines(void *unused)
|
|||
"Temporary RESV for [%s] expired",
|
||||
aconf->name);
|
||||
free_conf(aconf);
|
||||
dlinkDestroy(ptr, &resv_conf_list);
|
||||
rb_dlinkDestroy(ptr, &resv_conf_list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -736,7 +736,7 @@ expire_temp_rxlines(void *unused)
|
|||
"Temporary X-line for [%s] expired",
|
||||
aconf->name);
|
||||
free_conf(aconf);
|
||||
dlinkDestroy(ptr, &xline_conf_list);
|
||||
rb_dlinkDestroy(ptr, &xline_conf_list);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ expire_temp_rxlines(void *unused)
|
|||
unsigned long
|
||||
get_nd_count(void)
|
||||
{
|
||||
return(dlink_list_length(&nd_list));
|
||||
return(rb_dlink_list_length(&nd_list));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -761,7 +761,7 @@ add_nd_entry(const char *name)
|
|||
nd->expire = CurrentTime + ConfigFileEntry.nick_delay;
|
||||
|
||||
/* this list is ordered */
|
||||
dlinkAddTail(nd, &nd->lnode, &nd_list);
|
||||
rb_dlinkAddTail(nd, &nd->lnode, &nd_list);
|
||||
|
||||
irc_dictionary_add(nd_dict, nd->name, nd);
|
||||
}
|
||||
|
@ -771,7 +771,7 @@ free_nd_entry(struct nd_entry *nd)
|
|||
{
|
||||
irc_dictionary_delete(nd_dict, nd->name);
|
||||
|
||||
dlinkDelete(&nd->lnode, &nd_list);
|
||||
rb_dlinkDelete(&nd->lnode, &nd_list);
|
||||
BlockHeapFree(nd_heap, nd);
|
||||
}
|
||||
|
||||
|
@ -779,8 +779,8 @@ void
|
|||
expire_nd_entries(void *unused)
|
||||
{
|
||||
struct nd_entry *nd;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, nd_list.head)
|
||||
{
|
||||
|
@ -814,7 +814,7 @@ add_tgchange(const char *host)
|
|||
DupString(target->ip, host);
|
||||
target->expiry = CurrentTime + (60*60*12);
|
||||
|
||||
dlinkAdd(target, &target->node, &tgchange_list);
|
||||
rb_dlinkAdd(target, &target->node, &tgchange_list);
|
||||
}
|
||||
|
||||
tgchange *
|
||||
|
|
56
src/s_serv.c
56
src/s_serv.c
|
@ -207,7 +207,7 @@ slink_zipstats(unsigned int rpl, unsigned int len, unsigned char *data, struct C
|
|||
void
|
||||
collect_zipstats(void *unused)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Client *target_p;
|
||||
|
||||
DLINK_FOREACH(ptr, serv_list.head)
|
||||
|
@ -253,7 +253,7 @@ hunt_server(struct Client *client_p, struct Client *source_p,
|
|||
{
|
||||
struct Client *target_p;
|
||||
int wilds;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
const char *old;
|
||||
char *new;
|
||||
|
||||
|
@ -353,7 +353,7 @@ try_connections(void *unused)
|
|||
struct server_conf *server_p = NULL;
|
||||
struct server_conf *tmp_p;
|
||||
struct Class *cltmp;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
int connecting = FALSE;
|
||||
int confrq = 0;
|
||||
time_t next = 0;
|
||||
|
@ -410,8 +410,8 @@ try_connections(void *unused)
|
|||
return;
|
||||
|
||||
/* move this connect entry to end.. */
|
||||
dlinkDelete(&server_p->node, &server_conf_list);
|
||||
dlinkAddTail(server_p, &server_p->node, &server_conf_list);
|
||||
rb_dlinkDelete(&server_p->node, &server_conf_list);
|
||||
rb_dlinkAddTail(server_p, &server_p->node, &server_conf_list);
|
||||
|
||||
/*
|
||||
* We used to only print this if serv_connect() actually
|
||||
|
@ -440,7 +440,7 @@ check_server(const char *name, struct Client *client_p)
|
|||
{
|
||||
struct server_conf *server_p = NULL;
|
||||
struct server_conf *tmp_p;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
int error = -1;
|
||||
|
||||
s_assert(NULL != client_p);
|
||||
|
@ -547,9 +547,9 @@ send_capabilities(struct Client *client_p, int cap_can_send)
|
|||
* side effects - client is sent a list of +b, or +e, or +I modes
|
||||
*/
|
||||
static void
|
||||
burst_modes_TS5(struct Client *client_p, char *chname, dlink_list *list, char flag)
|
||||
burst_modes_TS5(struct Client *client_p, char *chname, rb_dlink_list *list, char flag)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *banptr;
|
||||
char mbuf[MODEBUFLEN];
|
||||
char pbuf[BUFSIZE];
|
||||
|
@ -604,9 +604,9 @@ burst_modes_TS5(struct Client *client_p, char *chname, dlink_list *list, char fl
|
|||
*/
|
||||
static void
|
||||
burst_modes_TS6(struct Client *client_p, struct Channel *chptr,
|
||||
dlink_list *list, char flag)
|
||||
rb_dlink_list *list, char flag)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Ban *banptr;
|
||||
char *t;
|
||||
int tlen;
|
||||
|
@ -669,8 +669,8 @@ burst_TS5(struct Client *client_p)
|
|||
struct membership *msptr;
|
||||
hook_data_client hclientinfo;
|
||||
hook_data_channel hchaninfo;
|
||||
dlink_node *ptr;
|
||||
dlink_node *uptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *uptr;
|
||||
char *t;
|
||||
int tlen, mlen;
|
||||
int cur_len = 0;
|
||||
|
@ -751,7 +751,7 @@ burst_TS5(struct Client *client_p)
|
|||
t += tlen;
|
||||
}
|
||||
|
||||
if (dlink_list_length(&chptr->members) > 0)
|
||||
if (rb_dlink_list_length(&chptr->members) > 0)
|
||||
{
|
||||
/* remove trailing space */
|
||||
t--;
|
||||
|
@ -801,8 +801,8 @@ burst_TS6(struct Client *client_p)
|
|||
struct membership *msptr;
|
||||
hook_data_client hclientinfo;
|
||||
hook_data_channel hchaninfo;
|
||||
dlink_node *ptr;
|
||||
dlink_node *uptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *uptr;
|
||||
char *t;
|
||||
int tlen, mlen;
|
||||
int cur_len = 0;
|
||||
|
@ -908,25 +908,25 @@ burst_TS6(struct Client *client_p)
|
|||
t += tlen;
|
||||
}
|
||||
|
||||
if (dlink_list_length(&chptr->members) > 0)
|
||||
if (rb_dlink_list_length(&chptr->members) > 0)
|
||||
{
|
||||
/* remove trailing space */
|
||||
*(t-1) = '\0';
|
||||
}
|
||||
sendto_one(client_p, "%s", buf);
|
||||
|
||||
if(dlink_list_length(&chptr->banlist) > 0)
|
||||
if(rb_dlink_list_length(&chptr->banlist) > 0)
|
||||
burst_modes_TS6(client_p, chptr, &chptr->banlist, 'b');
|
||||
|
||||
if(IsCapable(client_p, CAP_EX) &&
|
||||
dlink_list_length(&chptr->exceptlist) > 0)
|
||||
rb_dlink_list_length(&chptr->exceptlist) > 0)
|
||||
burst_modes_TS6(client_p, chptr, &chptr->exceptlist, 'e');
|
||||
|
||||
if(IsCapable(client_p, CAP_IE) &&
|
||||
dlink_list_length(&chptr->invexlist) > 0)
|
||||
rb_dlink_list_length(&chptr->invexlist) > 0)
|
||||
burst_modes_TS6(client_p, chptr, &chptr->invexlist, 'I');
|
||||
|
||||
if(dlink_list_length(&chptr->quietlist) > 0)
|
||||
if(rb_dlink_list_length(&chptr->quietlist) > 0)
|
||||
burst_modes_TS6(client_p, chptr, &chptr->quietlist, 'q');
|
||||
|
||||
if(IsCapable(client_p, CAP_TB) && chptr->topic != NULL)
|
||||
|
@ -998,7 +998,7 @@ server_estab(struct Client *client_p)
|
|||
struct server_conf *server_p;
|
||||
hook_data_client hdata;
|
||||
char *host;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
s_assert(NULL != client_p);
|
||||
if(client_p == NULL)
|
||||
|
@ -1095,10 +1095,10 @@ server_estab(struct Client *client_p)
|
|||
/* Update the capability combination usage counts */
|
||||
set_chcap_usage_counts(client_p);
|
||||
|
||||
dlinkAdd(client_p, &client_p->lnode, &me.serv->servers);
|
||||
rb_dlinkAdd(client_p, &client_p->lnode, &me.serv->servers);
|
||||
del_unknown_ip(client_p);
|
||||
dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &serv_list);
|
||||
dlinkAddTailAlloc(client_p, &global_serv_list);
|
||||
rb_dlinkMoveNode(&client_p->localClient->tnode, &unknown_list, &serv_list);
|
||||
rb_dlinkAddTailAlloc(client_p, &global_serv_list);
|
||||
|
||||
if(has_id(client_p))
|
||||
add_to_id_hash(client_p->id, client_p);
|
||||
|
@ -1120,10 +1120,10 @@ server_estab(struct Client *client_p)
|
|||
client_p->localClient->firsttime = CurrentTime;
|
||||
/* fixing eob timings.. -gnp */
|
||||
|
||||
if((dlink_list_length(&lclient_list) + dlink_list_length(&serv_list)) >
|
||||
if((rb_dlink_list_length(&lclient_list) + rb_dlink_list_length(&serv_list)) >
|
||||
(unsigned long)MaxConnectionCount)
|
||||
MaxConnectionCount = dlink_list_length(&lclient_list) +
|
||||
dlink_list_length(&serv_list);
|
||||
MaxConnectionCount = rb_dlink_list_length(&lclient_list) +
|
||||
rb_dlink_list_length(&serv_list);
|
||||
|
||||
/* Show the real host/IP to admins */
|
||||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
|
@ -1563,7 +1563,7 @@ serv_connect(struct server_conf *server_p, struct Client *by)
|
|||
client_p->serv->user = NULL;
|
||||
}
|
||||
SetConnecting(client_p);
|
||||
dlinkAddTail(client_p, &client_p->node, &global_client_list);
|
||||
rb_dlinkAddTail(client_p, &client_p->node, &global_client_list);
|
||||
|
||||
if(ServerConfVhosted(server_p))
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@ tstats(struct Client *source_p)
|
|||
struct Client *target_p;
|
||||
struct ServerStatistics *sp;
|
||||
struct ServerStatistics tmp;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
sp = &tmp;
|
||||
memcpy(sp, ServerStats, sizeof(struct ServerStatistics));
|
||||
|
@ -124,7 +124,7 @@ tstats(struct Client *source_p)
|
|||
"T :accepts %u refused %u", sp->is_ac, sp->is_ref);
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"T :rejected %u delaying %lu",
|
||||
sp->is_rej, dlink_list_length(&delay_exit));
|
||||
sp->is_rej, rb_dlink_list_length(&delay_exit));
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"T :nicks being delayed %lu",
|
||||
get_nd_count());
|
||||
|
@ -141,7 +141,7 @@ tstats(struct Client *source_p)
|
|||
"T :numerics seen %u", sp->is_num);
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"T :tgchange blocked msgs %u restricted addrs %lu",
|
||||
sp->is_tgch, dlink_list_length(&tgchange_list));
|
||||
sp->is_tgch, rb_dlink_list_length(&tgchange_list));
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"T :auth successes %u fails %u",
|
||||
sp->is_asuc, sp->is_abad);
|
||||
|
@ -170,8 +170,8 @@ count_memory(struct Client *source_p)
|
|||
struct Client *target_p;
|
||||
struct Channel *chptr;
|
||||
struct Ban *actualBan;
|
||||
dlink_node *dlink;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *rb_dlink;
|
||||
rb_dlink_node *ptr;
|
||||
int channel_count = 0;
|
||||
int local_client_conf_count = 0; /* local client conf links */
|
||||
int users_counted = 0; /* user structs */
|
||||
|
@ -229,8 +229,8 @@ count_memory(struct Client *source_p)
|
|||
if(target_p->user)
|
||||
{
|
||||
users_counted++;
|
||||
users_invited_count += dlink_list_length(&target_p->user->invited);
|
||||
user_channels += dlink_list_length(&target_p->user->channel);
|
||||
users_invited_count += rb_dlink_list_length(&target_p->user->invited);
|
||||
user_channels += rb_dlink_list_length(&target_p->user->channel);
|
||||
if(target_p->user->away)
|
||||
{
|
||||
aways_counted++;
|
||||
|
@ -246,45 +246,45 @@ count_memory(struct Client *source_p)
|
|||
channel_count++;
|
||||
channel_memory += (strlen(chptr->chname) + sizeof(struct Channel));
|
||||
|
||||
channel_users += dlink_list_length(&chptr->members);
|
||||
channel_invites += dlink_list_length(&chptr->invites);
|
||||
channel_users += rb_dlink_list_length(&chptr->members);
|
||||
channel_invites += rb_dlink_list_length(&chptr->invites);
|
||||
|
||||
DLINK_FOREACH(dlink, chptr->banlist.head)
|
||||
DLINK_FOREACH(rb_dlink, chptr->banlist.head)
|
||||
{
|
||||
actualBan = dlink->data;
|
||||
actualBan = rb_dlink->data;
|
||||
channel_bans++;
|
||||
|
||||
channel_ban_memory += sizeof(dlink_node) + sizeof(struct Ban);
|
||||
channel_ban_memory += sizeof(rb_dlink_node) + sizeof(struct Ban);
|
||||
}
|
||||
|
||||
DLINK_FOREACH(dlink, chptr->exceptlist.head)
|
||||
DLINK_FOREACH(rb_dlink, chptr->exceptlist.head)
|
||||
{
|
||||
actualBan = dlink->data;
|
||||
actualBan = rb_dlink->data;
|
||||
channel_except++;
|
||||
|
||||
channel_except_memory += (sizeof(dlink_node) + sizeof(struct Ban));
|
||||
channel_except_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban));
|
||||
}
|
||||
|
||||
DLINK_FOREACH(dlink, chptr->invexlist.head)
|
||||
DLINK_FOREACH(rb_dlink, chptr->invexlist.head)
|
||||
{
|
||||
actualBan = dlink->data;
|
||||
actualBan = rb_dlink->data;
|
||||
channel_invex++;
|
||||
|
||||
channel_invex_memory += (sizeof(dlink_node) + sizeof(struct Ban));
|
||||
channel_invex_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban));
|
||||
}
|
||||
|
||||
DLINK_FOREACH(dlink, chptr->quietlist.head)
|
||||
DLINK_FOREACH(rb_dlink, chptr->quietlist.head)
|
||||
{
|
||||
actualBan = dlink->data;
|
||||
actualBan = rb_dlink->data;
|
||||
channel_quiets++;
|
||||
|
||||
channel_quiet_memory += (sizeof(dlink_node) + sizeof(struct Ban));
|
||||
channel_quiet_memory += (sizeof(rb_dlink_node) + sizeof(struct Ban));
|
||||
}
|
||||
}
|
||||
|
||||
/* count up all classes */
|
||||
|
||||
class_count = dlink_list_length(&class_list) + 1;
|
||||
class_count = rb_dlink_list_length(&class_list) + 1;
|
||||
|
||||
count_linebuf_memory(&linebuf_count, &linebuf_memory_used);
|
||||
|
||||
|
@ -293,18 +293,18 @@ count_memory(struct Client *source_p)
|
|||
users_counted,
|
||||
(unsigned long) users_counted * sizeof(struct User),
|
||||
users_invited_count,
|
||||
(unsigned long) users_invited_count * sizeof(dlink_node));
|
||||
(unsigned long) users_invited_count * sizeof(rb_dlink_node));
|
||||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :User channels %u(%lu) Aways %u(%d)",
|
||||
user_channels,
|
||||
(unsigned long) user_channels * sizeof(dlink_node),
|
||||
(unsigned long) user_channels * sizeof(rb_dlink_node),
|
||||
aways_counted, (int) away_memory);
|
||||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :Attached confs %u(%lu)",
|
||||
local_client_conf_count,
|
||||
(unsigned long) local_client_conf_count * sizeof(dlink_node));
|
||||
(unsigned long) local_client_conf_count * sizeof(rb_dlink_node));
|
||||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :Conflines %u(%d)", conf_count, (int) conf_memory);
|
||||
|
@ -328,13 +328,13 @@ count_memory(struct Client *source_p)
|
|||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :Channel members %u(%lu) invite %u(%lu)",
|
||||
channel_users,
|
||||
(unsigned long) channel_users * sizeof(dlink_node),
|
||||
(unsigned long) channel_users * sizeof(rb_dlink_node),
|
||||
channel_invites,
|
||||
(unsigned long) channel_invites * sizeof(dlink_node));
|
||||
(unsigned long) channel_invites * sizeof(rb_dlink_node));
|
||||
|
||||
total_channel_memory = channel_memory +
|
||||
channel_ban_memory +
|
||||
channel_users * sizeof(dlink_node) + channel_invites * sizeof(dlink_node);
|
||||
channel_users * sizeof(rb_dlink_node) + channel_invites * sizeof(rb_dlink_node);
|
||||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :Whowas array %ld(%ld)",
|
||||
|
@ -344,8 +344,8 @@ count_memory(struct Client *source_p)
|
|||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :Hash: client %u(%ld) chan %u(%ld)",
|
||||
U_MAX, (long)(U_MAX * sizeof(dlink_list)),
|
||||
CH_MAX, (long)(CH_MAX * sizeof(dlink_list)));
|
||||
U_MAX, (long)(U_MAX * sizeof(rb_dlink_list)),
|
||||
CH_MAX, (long)(CH_MAX * sizeof(rb_dlink_list)));
|
||||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :linebuf %ld(%ld)",
|
||||
|
@ -359,7 +359,7 @@ count_memory(struct Client *source_p)
|
|||
|
||||
sendto_one_numeric(source_p, RPL_STATSDEBUG,
|
||||
"z :hostname hash %d(%ld)",
|
||||
HOST_MAX, (long)HOST_MAX * sizeof(dlink_list));
|
||||
HOST_MAX, (long)HOST_MAX * sizeof(rb_dlink_list));
|
||||
|
||||
total_memory = totww + total_channel_memory + conf_memory +
|
||||
class_count * sizeof(struct Class);
|
||||
|
|
60
src/s_user.c
60
src/s_user.c
|
@ -147,41 +147,41 @@ int user_modes[256] = {
|
|||
int
|
||||
show_lusers(struct Client *source_p)
|
||||
{
|
||||
if(dlink_list_length(&lclient_list) > (unsigned long)MaxClientCount)
|
||||
MaxClientCount = dlink_list_length(&lclient_list);
|
||||
if(rb_dlink_list_length(&lclient_list) > (unsigned long)MaxClientCount)
|
||||
MaxClientCount = rb_dlink_list_length(&lclient_list);
|
||||
|
||||
if((dlink_list_length(&lclient_list) + dlink_list_length(&serv_list)) >
|
||||
if((rb_dlink_list_length(&lclient_list) + rb_dlink_list_length(&serv_list)) >
|
||||
(unsigned long)MaxConnectionCount)
|
||||
MaxConnectionCount = dlink_list_length(&lclient_list) +
|
||||
dlink_list_length(&serv_list);
|
||||
MaxConnectionCount = rb_dlink_list_length(&lclient_list) +
|
||||
rb_dlink_list_length(&serv_list);
|
||||
|
||||
sendto_one_numeric(source_p, RPL_LUSERCLIENT, form_str(RPL_LUSERCLIENT),
|
||||
(Count.total - Count.invisi),
|
||||
Count.invisi, dlink_list_length(&global_serv_list));
|
||||
Count.invisi, rb_dlink_list_length(&global_serv_list));
|
||||
|
||||
if(dlink_list_length(&oper_list) > 0)
|
||||
if(rb_dlink_list_length(&oper_list) > 0)
|
||||
sendto_one_numeric(source_p, RPL_LUSEROP,
|
||||
form_str(RPL_LUSEROP), dlink_list_length(&oper_list));
|
||||
form_str(RPL_LUSEROP), rb_dlink_list_length(&oper_list));
|
||||
|
||||
if(dlink_list_length(&unknown_list) > 0)
|
||||
if(rb_dlink_list_length(&unknown_list) > 0)
|
||||
sendto_one_numeric(source_p, RPL_LUSERUNKNOWN,
|
||||
form_str(RPL_LUSERUNKNOWN),
|
||||
dlink_list_length(&unknown_list));
|
||||
rb_dlink_list_length(&unknown_list));
|
||||
|
||||
if(dlink_list_length(&global_channel_list) > 0)
|
||||
if(rb_dlink_list_length(&global_channel_list) > 0)
|
||||
sendto_one_numeric(source_p, RPL_LUSERCHANNELS,
|
||||
form_str(RPL_LUSERCHANNELS),
|
||||
dlink_list_length(&global_channel_list));
|
||||
rb_dlink_list_length(&global_channel_list));
|
||||
|
||||
sendto_one_numeric(source_p, RPL_LUSERME, form_str(RPL_LUSERME),
|
||||
dlink_list_length(&lclient_list),
|
||||
dlink_list_length(&serv_list));
|
||||
rb_dlink_list_length(&lclient_list),
|
||||
rb_dlink_list_length(&serv_list));
|
||||
|
||||
sendto_one_numeric(source_p, RPL_LOCALUSERS,
|
||||
form_str(RPL_LOCALUSERS),
|
||||
dlink_list_length(&lclient_list),
|
||||
rb_dlink_list_length(&lclient_list),
|
||||
Count.max_loc,
|
||||
dlink_list_length(&lclient_list),
|
||||
rb_dlink_list_length(&lclient_list),
|
||||
Count.max_loc);
|
||||
|
||||
sendto_one_numeric(source_p, RPL_GLOBALUSERS, form_str(RPL_GLOBALUSERS),
|
||||
|
@ -261,7 +261,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
return -1;
|
||||
|
||||
/* still has DNSbls to validate against */
|
||||
if(dlink_list_length(&source_p->preClient->dnsbl_queries) > 0)
|
||||
if(rb_dlink_list_length(&source_p->preClient->dnsbl_queries) > 0)
|
||||
return -1;
|
||||
|
||||
client_p->localClient->last = CurrentTime;
|
||||
|
@ -397,7 +397,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
* -Taner
|
||||
*/
|
||||
/* Except "F:" clients */
|
||||
if(dlink_list_length(&lclient_list) >=
|
||||
if(rb_dlink_list_length(&lclient_list) >=
|
||||
(unsigned long)GlobalSetOptions.maxclients && !IsConfExemptLimits(aconf))
|
||||
{
|
||||
sendto_realops_snomask(SNO_FULL, L_ALL,
|
||||
|
@ -426,7 +426,7 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
source_p->sockhost, source_p->preClient->dnsbl_listed->host);
|
||||
else
|
||||
{
|
||||
dlink_list varlist = { NULL, NULL, 0 };
|
||||
rb_dlink_list varlist = { NULL, NULL, 0 };
|
||||
|
||||
substitution_append_var(&varlist, "nick", source_p->name);
|
||||
substitution_append_var(&varlist, "ip", source_p->sockhost);
|
||||
|
@ -526,11 +526,11 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
|
||||
s_assert(!IsClient(source_p));
|
||||
del_unknown_ip(source_p);
|
||||
dlinkMoveNode(&source_p->localClient->tnode, &unknown_list, &lclient_list);
|
||||
rb_dlinkMoveNode(&source_p->localClient->tnode, &unknown_list, &lclient_list);
|
||||
SetClient(source_p);
|
||||
|
||||
source_p->servptr = &me;
|
||||
dlinkAdd(source_p, &source_p->lnode, &source_p->servptr->serv->users);
|
||||
rb_dlinkAdd(source_p, &source_p->lnode, &source_p->servptr->serv->users);
|
||||
|
||||
/* Increment our total user count here */
|
||||
if(++Count.total > Count.max_tot)
|
||||
|
@ -542,9 +542,9 @@ register_local_user(struct Client *client_p, struct Client *source_p, const char
|
|||
|
||||
s_assert(source_p->localClient != NULL);
|
||||
|
||||
if(dlink_list_length(&lclient_list) > (unsigned long)Count.max_loc)
|
||||
if(rb_dlink_list_length(&lclient_list) > (unsigned long)Count.max_loc)
|
||||
{
|
||||
Count.max_loc = dlink_list_length(&lclient_list);
|
||||
Count.max_loc = rb_dlink_list_length(&lclient_list);
|
||||
if(!(Count.max_loc % 10))
|
||||
sendto_realops_snomask(SNO_GENERAL, L_ALL,
|
||||
"New Max Local Clients: %d", Count.max_loc);
|
||||
|
@ -964,7 +964,7 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
|
|||
{
|
||||
++Count.oper;
|
||||
SetOper(source_p);
|
||||
dlinkAddAlloc(source_p, &oper_list);
|
||||
rb_dlinkAddAlloc(source_p, &oper_list);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -993,10 +993,10 @@ user_mode(struct Client *client_p, struct Client *source_p, int parc, const char
|
|||
MyFree(source_p->localClient->opername);
|
||||
source_p->localClient->opername = NULL;
|
||||
|
||||
dlinkFindDestroy(source_p, &local_oper_list);
|
||||
rb_dlinkFindDestroy(source_p, &local_oper_list);
|
||||
}
|
||||
|
||||
dlinkFindDestroy(source_p, &oper_list);
|
||||
rb_dlinkFindDestroy(source_p, &oper_list);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1179,7 +1179,7 @@ send_umode_out(struct Client *client_p, struct Client *source_p, int old)
|
|||
{
|
||||
struct Client *target_p;
|
||||
char buf[BUFSIZE];
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
|
||||
send_umode(NULL, source_p, old, 0, buf);
|
||||
|
||||
|
@ -1279,8 +1279,8 @@ oper_up(struct Client *source_p, struct oper_conf *oper_p)
|
|||
source_p->flags2 |= oper_p->flags;
|
||||
DupString(source_p->localClient->opername, oper_p->name);
|
||||
|
||||
dlinkAddAlloc(source_p, &local_oper_list);
|
||||
dlinkAddAlloc(source_p, &oper_list);
|
||||
rb_dlinkAddAlloc(source_p, &local_oper_list);
|
||||
rb_dlinkAddAlloc(source_p, &oper_list);
|
||||
|
||||
if(IsOperAdmin(source_p) && !IsOperHiddenAdmin(source_p))
|
||||
source_p->umodes |= UMODE_ADMIN;
|
||||
|
@ -1370,7 +1370,7 @@ void
|
|||
change_nick_user_host(struct Client *target_p, const char *nick, const char *user,
|
||||
const char *host, int newts, char *format, ...)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Channel *chptr;
|
||||
struct membership *mscptr;
|
||||
int changed = irccmp(target_p->name, nick);
|
||||
|
|
64
src/send.c
64
src/send.c
|
@ -446,12 +446,12 @@ sendto_server(struct Client *one, struct Channel *chptr, unsigned long caps,
|
|||
{
|
||||
va_list args;
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
buf_head_t linebuf;
|
||||
|
||||
/* noone to send to.. */
|
||||
if(dlink_list_length(&serv_list) == 0)
|
||||
if(rb_dlink_list_length(&serv_list) == 0)
|
||||
return;
|
||||
|
||||
if(chptr != NULL && *chptr->chname != '#')
|
||||
|
@ -502,8 +502,8 @@ sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
|
|||
buf_head_t linebuf_id;
|
||||
struct Client *target_p;
|
||||
struct membership *msptr;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
linebuf_newbuf(&linebuf_local);
|
||||
linebuf_newbuf(&linebuf_name);
|
||||
|
@ -582,8 +582,8 @@ sendto_channel_local(int type, struct Channel *chptr, const char *pattern, ...)
|
|||
buf_head_t linebuf;
|
||||
struct membership *msptr;
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
linebuf_newbuf(&linebuf);
|
||||
|
||||
|
@ -622,8 +622,8 @@ sendto_channel_local_butone(struct Client *one, int type, struct Channel *chptr,
|
|||
buf_head_t linebuf;
|
||||
struct membership *msptr;
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
linebuf_newbuf(&linebuf);
|
||||
|
||||
|
@ -665,10 +665,10 @@ void
|
|||
sendto_common_channels_local(struct Client *user, const char *pattern, ...)
|
||||
{
|
||||
va_list args;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
dlink_node *uptr;
|
||||
dlink_node *next_uptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
rb_dlink_node *uptr;
|
||||
rb_dlink_node *next_uptr;
|
||||
struct Channel *chptr;
|
||||
struct Client *target_p;
|
||||
struct membership *msptr;
|
||||
|
@ -723,10 +723,10 @@ void
|
|||
sendto_common_channels_local_butone(struct Client *user, const char *pattern, ...)
|
||||
{
|
||||
va_list args;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
dlink_node *uptr;
|
||||
dlink_node *next_uptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
rb_dlink_node *uptr;
|
||||
rb_dlink_node *next_uptr;
|
||||
struct Channel *chptr;
|
||||
struct Client *target_p;
|
||||
struct membership *msptr;
|
||||
|
@ -777,8 +777,8 @@ sendto_match_butone(struct Client *one, struct Client *source_p,
|
|||
static char buf[BUFSIZE];
|
||||
va_list args;
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
buf_head_t linebuf_local;
|
||||
buf_head_t linebuf_name;
|
||||
buf_head_t linebuf_id;
|
||||
|
@ -853,7 +853,7 @@ sendto_match_servs(struct Client *source_p, const char *mask, int cap,
|
|||
{
|
||||
static char buf[BUFSIZE];
|
||||
va_list args;
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct Client *target_p;
|
||||
buf_head_t linebuf_id;
|
||||
buf_head_t linebuf_name;
|
||||
|
@ -922,8 +922,8 @@ sendto_monitor(struct monitor *monptr, const char *pattern, ...)
|
|||
va_list args;
|
||||
buf_head_t linebuf;
|
||||
struct Client *target_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
|
||||
linebuf_newbuf(&linebuf);
|
||||
|
||||
|
@ -998,8 +998,8 @@ void
|
|||
sendto_realops_flags(int flags, int level, const char *pattern, ...)
|
||||
{
|
||||
struct Client *client_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
va_list args;
|
||||
buf_head_t linebuf;
|
||||
|
||||
|
@ -1040,8 +1040,8 @@ sendto_realops_snomask(int flags, int level, const char *pattern, ...)
|
|||
static char buf[BUFSIZE];
|
||||
char *snobuf;
|
||||
struct Client *client_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
va_list args;
|
||||
buf_head_t linebuf;
|
||||
|
||||
|
@ -1105,8 +1105,8 @@ sendto_realops_snomask_from(int flags, int level, struct Client *source_p,
|
|||
const char *pattern, ...)
|
||||
{
|
||||
struct Client *client_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
va_list args;
|
||||
buf_head_t linebuf;
|
||||
|
||||
|
@ -1148,8 +1148,8 @@ void
|
|||
sendto_wallops_flags(int flags, struct Client *source_p, const char *pattern, ...)
|
||||
{
|
||||
struct Client *client_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
va_list args;
|
||||
buf_head_t linebuf;
|
||||
|
||||
|
@ -1218,8 +1218,8 @@ kill_client_serv_butone(struct Client *one, struct Client *target_p, const char
|
|||
static char buf[BUFSIZE];
|
||||
va_list args;
|
||||
struct Client *client_p;
|
||||
dlink_node *ptr;
|
||||
dlink_node *next_ptr;
|
||||
rb_dlink_node *ptr;
|
||||
rb_dlink_node *next_ptr;
|
||||
buf_head_t linebuf_id;
|
||||
buf_head_t linebuf_name;
|
||||
|
||||
|
|
|
@ -53,36 +53,36 @@ struct substitution_variable
|
|||
/*
|
||||
* substitution_append_var
|
||||
*
|
||||
* Inputs - A variable list (dlink_list), name -> value for mapping to make
|
||||
* Inputs - A variable list (rb_dlink_list), name -> value for mapping to make
|
||||
* Output - none
|
||||
* Side Effects - Adds a name->value mapping to a list.
|
||||
*/
|
||||
void substitution_append_var(dlink_list *varlist, const char *name, const char *value)
|
||||
void substitution_append_var(rb_dlink_list *varlist, const char *name, const char *value)
|
||||
{
|
||||
struct substitution_variable *tmp = MyMalloc(sizeof(struct substitution_variable));
|
||||
|
||||
DupString(tmp->name, name);
|
||||
DupString(tmp->value, value);
|
||||
|
||||
dlinkAddAlloc(tmp, varlist);
|
||||
rb_dlinkAddAlloc(tmp, varlist);
|
||||
}
|
||||
|
||||
/*
|
||||
* substitution_free
|
||||
*
|
||||
* Inputs - A dlink_list of markup variables to free.
|
||||
* Inputs - A rb_dlink_list of markup variables to free.
|
||||
* Outputs - none
|
||||
* Side Effects - Empties a list of markup variables.
|
||||
*/
|
||||
void substitution_free(dlink_list *varlist)
|
||||
void substitution_free(rb_dlink_list *varlist)
|
||||
{
|
||||
dlink_node *nptr, *nptr2;
|
||||
rb_dlink_node *nptr, *nptr2;
|
||||
|
||||
DLINK_FOREACH_SAFE(nptr, nptr2, varlist->head)
|
||||
{
|
||||
struct substitution_variable *tmp = (struct substitution_variable *) nptr->data;
|
||||
|
||||
dlinkDelete(nptr, varlist);
|
||||
rb_dlinkDelete(nptr, varlist);
|
||||
MyFree(tmp->name);
|
||||
MyFree(tmp->value);
|
||||
MyFree(tmp);
|
||||
|
@ -92,11 +92,11 @@ void substitution_free(dlink_list *varlist)
|
|||
/*
|
||||
* substitution_parse
|
||||
*
|
||||
* Inputs - A markup string, dlink-list of markup values
|
||||
* Inputs - A markup string, rb_dlink-list of markup values
|
||||
* Output - A string which has been markup-replaced.
|
||||
* Side Effects - Strings larger than BUFSIZE are terminated.
|
||||
*/
|
||||
char *substitution_parse(const char *fmt, dlink_list *varlist)
|
||||
char *substitution_parse(const char *fmt, rb_dlink_list *varlist)
|
||||
{
|
||||
static char buf[BUFSIZE];
|
||||
const char *ptr;
|
||||
|
@ -110,7 +110,7 @@ char *substitution_parse(const char *fmt, dlink_list *varlist)
|
|||
static char varname[BUFSIZE];
|
||||
char *vptr = varname;
|
||||
const char *pptr;
|
||||
dlink_node *nptr;
|
||||
rb_dlink_node *nptr;
|
||||
|
||||
*vptr = '\0';
|
||||
|
||||
|
|
|
@ -89,14 +89,14 @@
|
|||
#include "s_conf.h"
|
||||
#include "supported.h"
|
||||
|
||||
dlink_list isupportlist;
|
||||
rb_dlink_list isupportlist;
|
||||
|
||||
struct isupportitem
|
||||
{
|
||||
const char *name;
|
||||
const char *(*func)(const void *);
|
||||
const void *param;
|
||||
dlink_node node;
|
||||
rb_dlink_node node;
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -108,13 +108,13 @@ add_isupport(const char *name, const char *(*func)(const void *), const void *pa
|
|||
item->name = name;
|
||||
item->func = func;
|
||||
item->param = param;
|
||||
dlinkAddTail(item, &item->node, &isupportlist);
|
||||
rb_dlinkAddTail(item, &item->node, &isupportlist);
|
||||
}
|
||||
|
||||
void
|
||||
delete_isupport(const char *name)
|
||||
{
|
||||
dlink_node *ptr, *next_ptr;
|
||||
rb_dlink_node *ptr, *next_ptr;
|
||||
struct isupportitem *item;
|
||||
|
||||
DLINK_FOREACH_SAFE(ptr, next_ptr, isupportlist.head)
|
||||
|
@ -123,7 +123,7 @@ delete_isupport(const char *name)
|
|||
|
||||
if (!strcmp(item->name, name))
|
||||
{
|
||||
dlinkDelete(ptr, &isupportlist);
|
||||
rb_dlinkDelete(ptr, &isupportlist);
|
||||
MyFree(item);
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +133,7 @@ delete_isupport(const char *name)
|
|||
void
|
||||
show_isupport(struct Client *client_p)
|
||||
{
|
||||
dlink_node *ptr;
|
||||
rb_dlink_node *ptr;
|
||||
struct isupportitem *item;
|
||||
const char *value;
|
||||
char buf[512];
|
||||
|
@ -214,7 +214,7 @@ isupport_chanmodes(const void *ptr)
|
|||
ConfigChannel.use_except ? "e" : "",
|
||||
ConfigChannel.use_invex ? "I" : "",
|
||||
ConfigChannel.use_forward ? "f" : "",
|
||||
dlink_list_length(&service_list) ? "r" : "",
|
||||
rb_dlink_list_length(&service_list) ? "r" : "",
|
||||
ConfigChannel.use_forward ? "QF" : "");
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue