]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_neighbor.c
*: remove THREAD_ON macros, add nullity check
[mirror_frr.git] / ospf6d / ospf6_neighbor.c
index 118210dfc7dc4ecfc927eac8abad7c3ca147ae49..35ac40fc852707f4401bf597e41cf5e5446cad39 100644 (file)
@@ -238,8 +238,8 @@ hello_received (struct thread *thread)
 
   /* reset Inactivity Timer */
   THREAD_OFF (on->inactivity_timer);
-  on->inactivity_timer = thread_add_timer (master, inactivity_timer, on,
-                                           on->ospf6_if->dead_interval);
+  on->inactivity_timer = thread_add_timer(master, inactivity_timer, on,
+                                          on->ospf6_if->dead_interval, NULL);
 
   if (on->state <= OSPF6_NEIGHBOR_DOWN)
     ospf6_neighbor_state_change (OSPF6_NEIGHBOR_INIT, on,
@@ -262,7 +262,7 @@ twoway_received (struct thread *thread)
   if (IS_OSPF6_DEBUG_NEIGHBOR (EVENT))
     zlog_debug ("Neighbor Event %s: *2Way-Received*", on->name);
 
-  thread_add_event (master, neighbor_change, on->ospf6_if, 0);
+  thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
 
   if (! need_adjacency (on))
     {
@@ -279,7 +279,7 @@ twoway_received (struct thread *thread)
 
   THREAD_OFF (on->thread_send_dbdesc);
   on->thread_send_dbdesc =
-    thread_add_event (master, ospf6_dbdesc_send, on, 0);
+    thread_add_event(master, ospf6_dbdesc_send, on, 0, NULL);
 
   return 0;
 }
@@ -385,9 +385,8 @@ exchange_done (struct thread *thread)
       ospf6_neighbor_state_change (OSPF6_NEIGHBOR_LOADING, on,
                                   OSPF6_NEIGHBOR_EVENT_EXCHANGE_DONE);
 
-      if (on->thread_send_lsreq == NULL)
-       on->thread_send_lsreq =
-         thread_add_event (master, ospf6_lsreq_send, on, 0);
+      thread_add_event(master, ospf6_lsreq_send, on, 0,
+                       &on->thread_send_lsreq);
     }
 
   return 0;
@@ -406,13 +405,13 @@ ospf6_check_nbr_loading (struct ospf6_neighbor *on)
       (on->state == OSPF6_NEIGHBOR_EXCHANGE))
     {
       if (on->request_list->count == 0)
-       thread_add_event (master, loading_done, on, 0);
+       thread_add_event(master, loading_done, on, 0, NULL);
       else if (on->last_ls_req == NULL)
        {
          if (on->thread_send_lsreq != NULL)
            THREAD_OFF (on->thread_send_lsreq);
          on->thread_send_lsreq =
-           thread_add_event (master, ospf6_lsreq_send, on, 0);
+           thread_add_event(master, ospf6_lsreq_send, on, 0, NULL);
        }
     }
 }
@@ -461,7 +460,7 @@ adj_ok (struct thread *thread)
 
       THREAD_OFF (on->thread_send_dbdesc);
       on->thread_send_dbdesc =
-        thread_add_event (master, ospf6_dbdesc_send, on, 0);
+        thread_add_event(master, ospf6_dbdesc_send, on, 0, NULL);
 
     }
   else if (on->state >= OSPF6_NEIGHBOR_EXSTART &&
@@ -516,7 +515,7 @@ seqnumber_mismatch (struct thread *thread)
   on->dbdesc_seqnum++;         /* Incr seqnum as per RFC2328, sec 10.3 */
 
   on->thread_send_dbdesc =
-    thread_add_event (master, ospf6_dbdesc_send, on, 0);
+    thread_add_event(master, ospf6_dbdesc_send, on, 0, NULL);
 
   return 0;
 }
@@ -555,7 +554,7 @@ bad_lsreq (struct thread *thread)
   on->dbdesc_seqnum++;         /* Incr seqnum as per RFC2328, sec 10.3 */
 
   on->thread_send_dbdesc =
-    thread_add_event (master, ospf6_dbdesc_send, on, 0);
+    thread_add_event(master, ospf6_dbdesc_send, on, 0, NULL);
 
   return 0;
 }
@@ -577,7 +576,7 @@ oneway_received (struct thread *thread)
 
   ospf6_neighbor_state_change (OSPF6_NEIGHBOR_INIT, on,
                               OSPF6_NEIGHBOR_EVENT_ONEWAY_RCVD);
-  thread_add_event (master, neighbor_change, on->ospf6_if, 0);
+  thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
 
   ospf6_lsdb_remove_all (on->summary_list);
   ospf6_lsdb_remove_all (on->request_list);
@@ -613,7 +612,7 @@ inactivity_timer (struct thread *thread)
 
   ospf6_neighbor_state_change (OSPF6_NEIGHBOR_DOWN, on,
                               OSPF6_NEIGHBOR_EVENT_INACTIVITY_TIMER);
-  thread_add_event (master, neighbor_change, on->ospf6_if, 0);
+  thread_add_event(master, neighbor_change, on->ospf6_if, 0, NULL);
 
   listnode_delete (on->ospf6_if->neighbor_list, on);
   ospf6_neighbor_delete (on);