/[svn]/hopm/branches/1.1.x/src/opercmd.c
ViewVC logotype

Diff of /hopm/branches/1.1.x/src/opercmd.c

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

revision 8187 by michael, Sat Apr 8 16:30:37 2017 UTC revision 8188 by michael, Fri Apr 14 11:14:47 2017 UTC
# Line 205  command_parse(const char *command, const Line 205  command_parse(const char *command, const
205        /* Queue this command */        /* Queue this command */
206        struct Command *cmd = command_create(tab, param, source_p, target);        struct Command *cmd = command_create(tab, param, source_p, target);
207    
208        list_add(&COMMANDS, node_create(cmd));        list_add(&COMMANDS, &cmd->node);
209        break;        break;
210      }      }
211    }    }
# Line 243  command_timer(void) Line 243  command_timer(void)
243    
244      if ((present - command->added) > OptionsItem->command_timeout)      if ((present - command->added) > OptionsItem->command_timeout)
245      {      {
246          list_remove(&COMMANDS, &command->node);
247        command_free(command);        command_free(command);
       list_remove(&COMMANDS, node);  
       node_free(node);  
248      }      }
249      else  /* Since the queue is in order, it's also ordered by time, no nodes after this will be timed out */      else  /* Since the queue is in order, it's also ordered by time, no nodes after this will be timed out */
250        return;        return;
# Line 298  command_userhost(const char *reply) Line 297  command_userhost(const char *reply)
297          command->tab->handler(command->param, command->target);          command->tab->handler(command->param, command->target);
298    
299        /* Cleanup the command */        /* Cleanup the command */
300          list_remove(&COMMANDS, &command->node);
301        command_free(command);        command_free(command);
       list_remove(&COMMANDS, node);  
       node_free(node);  
302      }      }
303    }    }
304  }  }

Legend:
Removed from v.8187  
changed lines
  Added in v.8188

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