/[svn]/hopm/trunk/src/opercmd.c
ViewVC logotype

Diff of /hopm/trunk/src/opercmd.c

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

revision 8188 by michael, Fri Apr 14 11:14:29 2017 UTC revision 8189 by michael, Fri Apr 14 11:57:26 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, &cmd->node);        list_add(&COMMANDS, node_create(cmd));
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      {      {
       list_remove(&COMMANDS, &command->node);  
246        command_free(command);        command_free(command);
247          list_remove(&COMMANDS, node);
248          node_free(node);
249      }      }
250      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 */
251        return;        return;
# Line 297  command_userhost(const char *reply) Line 298  command_userhost(const char *reply)
298          command->tab->handler(command->param, command->target);          command->tab->handler(command->param, command->target);
299    
300        /* Cleanup the command */        /* Cleanup the command */
       list_remove(&COMMANDS, &command->node);  
301        command_free(command);        command_free(command);
302          list_remove(&COMMANDS, node);
303          node_free(node);
304      }      }
305    }    }
306  }  }

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

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