]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Use our own SUN_LEN if libc doesn't provide it.
authorMartin Mares <mj@ucw.cz>
Fri, 16 Jun 2000 23:12:47 +0000 (23:12 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 16 Jun 2000 23:12:47 +0000 (23:12 +0000)
TODO
client/client.c
sysdep/unix/unix.h

diff --git a/TODO b/TODO
index 12be399bd8a35b6f7c84c60d00618c695a1a7bdb..a409277eba8dce3894b90022e203d1dc646b3818 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,9 @@
 Core
 ~~~~
+- socket open failure should not be fatal
+- &&,||: priorities
+- client: `?' in BGP masks
+- filters: function for BGP path length
 
 Globals
 ~~~~~~~
index a139b04647e4390f2e959a12d7b88cf103d27bc7..c579352bea2133605a3c06889c60c583d2614184 100644 (file)
@@ -22,6 +22,7 @@
 #include "lib/resource.h"
 #include "lib/string.h"
 #include "client/client.h"
+#include "sysdep/unix/unix.h"
 
 static char *opt_list = "s:v";
 static int verbose;
@@ -69,7 +70,7 @@ parse_args(int argc, char **argv)
 /*** Input ***/
 
 static void server_send(char *);
-static void io_loop(int);
+static void select_loop(int);
 
 /* HACK: libreadline internals we need to access */
 extern int _rl_vis_botlin;
@@ -112,7 +113,7 @@ got_line(char *cmd_buffer)
            {
              server_send(cmd);
              input_hidden = -1;
-             io_loop(0);
+             select_loop(0);
              input_hidden = 0;
            }
          free(cmd);
@@ -316,7 +317,7 @@ server_read(void)
 static fd_set select_fds;
 
 static void
-io_loop(int mode)
+select_loop(int mode)
 {
   server_reply = -1;
   while (mode || server_reply < 0)
@@ -384,10 +385,10 @@ main(int argc, char **argv)
   parse_args(argc, argv);
   cmd_build_tree();
   server_connect();
-  io_loop(0);
+  select_loop(0);
 
   input_init();
 
-  io_loop(1);
+  select_loop(1);
   return 0;
 }
index 5da925c49896586d93cd7ae9b60863d72c809b0f..bb4d063d3b60445cdcd46e05a523304e8028682e 100644 (file)
@@ -34,6 +34,10 @@ typedef struct sockaddr_in6 sockaddr;
 typedef struct sockaddr_in sockaddr;
 #endif
 
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path))
+#endif
+
 struct birdsock;
 
 void io_init(void);