Minor fixes
authorAndreas Tonnesen <andreto@olsr.org>
Wed, 3 Nov 2004 20:54:47 +0000 (20:54 +0000)
committerAndreas Tonnesen <andreto@olsr.org>
Wed, 3 Nov 2004 20:54:47 +0000 (20:54 +0000)
src/ipc_frontend.c
src/ipc_frontend.h
src/scheduler.c
src/tc_set.c

index a499b28..a2294ab 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: ipc_frontend.c,v 1.8 2004/10/19 20:18:00 kattemat Exp $
+ * $Id: ipc_frontend.c,v 1.9 2004/11/03 20:54:47 kattemat Exp $
  *
  */
 
@@ -98,6 +98,10 @@ ipc_init()
 }
 
 
+/*
+ * XXX - the socket should just be registered with the socket parser.
+ * Should NOT spawn this listen thread!
+ */
 void
 ipc_accept_thread()
 {
@@ -128,7 +132,7 @@ ipc_accept_thread()
            }
          else
            {
-             ipc_active = 1;
+             ipc_active = TRUE;
              ipc_send_net_info();
              ipc_send_all_routes();
              olsr_printf(1, "Connection from %s\n",addr);
@@ -194,7 +198,7 @@ frontend_msgparser(union olsr_message *msg, struct interface *in_if, union olsr_
       olsr_printf(1, "(OUTPUT)IPC connection lost!\n");
       close(ipc_connection);
       //olsr_cnf->open_ipc = 0;
-      ipc_active = 0;
+      ipc_active = FALSE;
       return;
     }
   
@@ -278,7 +282,7 @@ ipc_route_send_rtentry(union olsr_kernel_route *kernel_route, int add, char *int
       olsr_printf(1, "(RT_ENTRY)IPC connection lost!\n");
       close(ipc_connection);
       //olsr_cnf->open_ipc = 0;
-      ipc_active = 0;
+      ipc_active = FALSE;
       return -1;
     }
 
@@ -340,7 +344,7 @@ ipc_send_all_routes()
              olsr_printf(1, "(RT_ENTRY)IPC connection lost!\n");
              close(ipc_connection);
              //olsr_cnf->open_ipc = 0;
-             ipc_active = 0;
+             ipc_active = FALSE;
              return -1;
            }
 
@@ -385,7 +389,7 @@ ipc_send_all_routes()
              olsr_printf(1, "(RT_ENTRY)IPC connection lost!\n");
              close(ipc_connection);
              //olsr_cnf->open_ipc = 0;
-             ipc_active = 0;
+             ipc_active = FALSE;
              return -1;
            }
 
index 29c95f5..0401e0e 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: ipc_frontend.h,v 1.6 2004/10/09 22:32:47 kattemat Exp $
+ * $Id: ipc_frontend.h,v 1.7 2004/11/03 20:54:47 kattemat Exp $
  *
  */
 /*
@@ -83,7 +83,7 @@ struct ipc_net_msg
 
 int ipc_connection;
 int ipc_sock;
-int ipc_active;
+olsr_bool ipc_active;
 
 void
 ipc_accept_thread(void);
index 0b5ad80..1de46ed 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: scheduler.c,v 1.13 2004/11/03 09:22:59 kattemat Exp $
+ * $Id: scheduler.c,v 1.14 2004/11/03 20:54:47 kattemat Exp $
  *
  */
 
@@ -157,7 +157,7 @@ scheduler()
 
       if(changes)
        {
-         olsr_printf(3, "ANSN UPDATED\n\n");
+         olsr_printf(3, "ANSN UPDATED %d\n\n", ansn);
          ansn++;
 #warning changes is set to FALSE in scheduler now
           changes = FALSE;
index e42c418..61cca73 100644 (file)
@@ -19,7 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  * 
  * 
- * $Id: tc_set.c,v 1.6 2004/11/03 09:22:59 kattemat Exp $
+ * $Id: tc_set.c,v 1.7 2004/11/03 20:54:47 kattemat Exp $
  *
  */
 
@@ -189,10 +189,6 @@ olsr_tc_delete_mprs(struct tc_entry *entry, struct tc_message *msg)
 
          /* dequeue */
          DEQUEUE_ELEM(dst_to_del);
-         /*
-         dst_to_del->next->prev = dst_to_del->prev;
-         dst_to_del->prev->next = dst_to_del->next;
-         */
 
          free(dst_to_del);
          retval = 1;