Small cleanup in DLEP code to make sure session cleanup does not block
authorHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 14 Nov 2017 08:45:43 +0000 (09:45 +0100)
committerHenning Rogge <henning.rogge@fkie.fraunhofer.de>
Tue, 14 Nov 2017 08:45:43 +0000 (09:45 +0100)
src-plugins/generic/dlep/dlep_session.c
src-plugins/generic/dlep/ext_base_proto/proto_router.c

index 6e3939b..71413fa 100644 (file)
@@ -234,12 +234,10 @@ dlep_session_remove(struct dlep_session *session) {
 void
 dlep_session_terminate(struct dlep_session *session) {
   if (session->restrict_signal != DLEP_ALL_SIGNALS) {
-    return;
+    dlep_session_generate_signal(
+        session, DLEP_SESSION_TERMINATION, NULL);
+    session->cb_send_buffer(session, 0);
   }
-
-  dlep_session_generate_signal(
-      session, DLEP_SESSION_TERMINATION, NULL);
-  session->cb_send_buffer(session, 0);
   session->restrict_signal = DLEP_SESSION_TERMINATION_ACK;
 }
 
index 1804797..7d91816 100644 (file)
@@ -204,7 +204,7 @@ _cb_apply_router(struct dlep_session *session) {
         PRIu64, session->cfg.discovery_interval);
 
     /* use the "local event" for the discovery timer */
-    oonf_timer_start(&session->local_event_timer,
+    oonf_timer_set(&session->local_event_timer,
         session->cfg.discovery_interval);
   }
 }