"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "callout.c" between
mrouted-3.9.7.tar.gz and mrouted-3.9.8.tar.gz

About: mrouted is an implementation of the DVMRP multicast routing protocol.

callout.c  (mrouted-3.9.7):callout.c  (mrouted-3.9.8)
skipping to change at line 99 skipping to change at line 99
} }
/* /*
* sets the timer * sets the timer
* @delay: number of seconds for timeout * @delay: number of seconds for timeout
* @action: function to be called on timeout * @action: function to be called on timeout
* @data: what to call the timeout function with * @data: what to call the timeout function with
*/ */
int timer_setTimer(time_t delay, cfunc_t action, void *data) int timer_setTimer(time_t delay, cfunc_t action, void *data)
{ {
struct timeout_q *ptr, *node, *prev;
int i = 0; int i = 0;
struct timeout_q *ptr, *node, *prev;
/* create a node */ /* create a node */
node = (struct timeout_q *)malloc(sizeof(struct timeout_q)); node = malloc(sizeof(struct timeout_q));
if (!node) { if (!node) {
logit(LOG_WARNING, 0, "Malloc failed in timer_setTimer()\n"); logit(LOG_ERR, errno, "Failed allocating memory in %s:%s()", __FILE__, __ func__);
return -1; return -1;
} }
node->func = action; node->func = action;
node->data = data; node->data = data;
node->time = delay; node->time = delay;
node->next = 0; node->next = 0;
node->id = ++id; node->id = ++id;
prev = ptr = Q; prev = ptr = Q;
 End of changes. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS