Changeset 809


Ignore:
Timestamp:
06/11/07 10:09:36 (5 years ago)
Author:
wd
Message:

Make the ircd run/take connections properly (there were a handful of bugs in
different places).

Location:
trunk/ithildin
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ithildin/lib/event.c

    r787 r809  
    3333    event_t *ep = NULL; 
    3434         
    35     ep = malloc(sizeof(event_t)); 
     35    ep = calloc(sizeof(event_t), 1); 
    3636    ep->numhooks = 0; 
    3737    ep->flags = flags; 
     
    6565    else 
    6666        returned = hookreturns; 
    67         SLIST_FOREACH(hp, &ep->hooks, lp) { 
     67    SLIST_FOREACH(hp, &ep->hooks, lp) { 
    6868        if (hp->flags & (HOOK_FL_DEFERRED | HOOK_FL_NEW)) { 
    6969            needclean = true; 
  • trunk/ithildin/lib/module.c

    r808 r809  
    250250    } 
    251251 
    252     sn = strrchr(m->name, '/'); 
     252    sn = strrchr(m->name, '.'); 
    253253    if (sn == NULL) 
    254254        sn = m->name; 
  • trunk/ithildin/modules/ircd/ircd.c

    r808 r809  
    9393            connection_set_unregistered(cp); 
    9494        /* there is no connection timeout for fresh connections */ 
     95        cp = cp2; 
    9596    } 
    9697 
     
    434435         
    435436    if (!get_module_savedata(savelist, "ircd.hashes", &ircd.hashes)) { 
    436  
    437437        ircd.hashes.command = create_hash_table(32, 
    438438                offsetof(struct command, name), COMMAND_MAXLEN, 
  • trunk/ithildin/modules/ircd/protocol.c

    r808 r809  
    180180 
    181181    sprintf(mname, "ircd.protocol.%s", name); 
    182     if (!load_module(mname, MODULE_FL_CREATE|MODULE_FL_QUIET)) { 
     182    if (find_module(mname) == NULL && 
     183            !load_module(mname, MODULE_FL_CREATE|MODULE_FL_QUIET)) { 
    183184        log_error("unable to load module for protocol %s", name); 
    184185        return 0; 
     
    206207    uint64_t *i64p; 
    207208 
    208     if (pp == NULL) 
    209         return; 
     209    /* if it it doesn't exist, try to add it */ 
     210    if (pp == NULL) { 
     211        if (!add_protocol(name)) 
     212            return; 
     213        else 
     214            pp = find_protocol(name); 
     215    } 
    210216 
    211217    log_debug("updating protocol %s", pp->name); 
Note: See TracChangeset for help on using the changeset viewer.