gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r29371 - msh/src


From: gnunet
Subject: [GNUnet-SVN] r29371 - msh/src
Date: Wed, 18 Sep 2013 14:03:24 +0200

Author: harsha
Date: 2013-09-18 14:03:24 +0200 (Wed, 18 Sep 2013)
New Revision: 29371

Modified:
   msh/src/Makefile.am
   msh/src/common.h
   msh/src/msh.c
   msh/src/util.c
   msh/src/util.h
Log:
- cleanup; remove dead targets


Modified: msh/src/Makefile.am
===================================================================
--- msh/src/Makefile.am 2013-09-18 12:02:31 UTC (rev 29370)
+++ msh/src/Makefile.am 2013-09-18 12:03:24 UTC (rev 29371)
@@ -8,21 +8,19 @@
 mshd_LDADD = -lgnunetutil -lm
 
 msh_SOURCES = msh.c mtypes.h
-msh_LDADD = -lgnunetutil
+msh_LDADD = -lgnunetutil util.$(OBJEXT)
 
 check_PROGRAMS = \
   test-bitmap \
   test-addressmap
 
-test_bitmap_SOURCES = test_bitmap.c bitmap.c bitmap.h
-test_bitmap_LDADD = -lgnunetutil
+test_bitmap_SOURCES = test_bitmap.c
+test_bitmap_LDADD = -lgnunetutil bitmap.$(OBJEXT)
 
-test_addressmap_SOURCES = test_addressmap.c addressmap.c addressmap.h
-test_addressmap_LDADD = -lgnunetutil
+test_addressmap_SOURCES = test_addressmap.c
+test_addressmap_LDADD = -lgnunetutil addressmap.$(OBJEXT) util.$(OBJEXT)
 
 TESTS = \
-  test-scheduler \
-  test-scheduler-socket \
   test-bitmap \
   test-addressmap
 

Modified: msh/src/common.h
===================================================================
--- msh/src/common.h    2013-09-18 12:02:31 UTC (rev 29370)
+++ msh/src/common.h    2013-09-18 12:03:24 UTC (rev 29371)
@@ -16,8 +16,6 @@
 #include <gnunet/platform.h>
 #include <gnunet/gnunet_common.h>
 
-#include <event2/event.h>
-
 #define MSH_close(fd)                                           \
   do {if (0 != close (fd))                                      \
       GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "close");   \

Modified: msh/src/msh.c
===================================================================
--- msh/src/msh.c       2013-09-18 12:02:31 UTC (rev 29370)
+++ msh/src/msh.c       2013-09-18 12:03:24 UTC (rev 29371)
@@ -9,6 +9,7 @@
 #include "common.h"
 #include <gnunet/gnunet_util_lib.h>
 #include "mtypes.h"
+#include "util.h"
 
 #define LOG(kind,...)                           \
   GNUNET_log (kind, __VA_ARGS__)
@@ -197,26 +198,6 @@
 
 
 /**
- * Function to convert an 32-bit IP address into numbers-and-dots notation
- *
- * @param ip the IP address
- * @return the string represeting the IP address.  The string is statically 
allocated.
- */
-char *
-ip2str (const in_addr_t ip)
-{
-  static char hostip[NI_MAXHOST];
-  
-  GNUNET_break (0 < snprintf (hostip, NI_MAXHOST, "%u.%u.%u.%u",
-                           ip >> 24, 
-                           (ip >> 16) % 256,
-                           (ip >> 8) % 256,
-                           ip % 256));
-  return hostip;
-}
-
-
-/**
  * Destroys a connection context
  *
  * @param ctx connection context

Modified: msh/src/util.c
===================================================================
--- msh/src/util.c      2013-09-18 12:02:31 UTC (rev 29370)
+++ msh/src/util.c      2013-09-18 12:03:24 UTC (rev 29371)
@@ -46,7 +46,7 @@
     GNUNET_break (0);
     goto clo_ret;
   }
-  if (GNUNET_OK != GNUNET_NETWORK_socket_listen (lsock, rwidth))
+  if (GNUNET_OK != GNUNET_NETWORK_socket_listen (lsock, backlog))
   {
     GNUNET_break (0);
     goto clo_ret;
@@ -60,13 +60,10 @@
 
 
 /**
- * Creates a new non-blocking socket and binds it to the given address and 
makes
- * it a listen socket
+ * Creates a new socket and connects it to the given address
  *
- * @param addr the address to bind to
+ * @param addr the address to connect to
  * @param addrlen the length of the addr
- * @param backlog the max length of the pending connections.  This will be
- *          passed to listen()
  * @return the socket's fd; -1 on error
  */
 int
@@ -105,7 +102,13 @@
 }
 
 
-char *
+/**
+ * Function to convert an 32-bit IP address into numbers-and-dots notation
+ *
+ * @param ip the IP address
+ * @return the string represeting the IP address.  The string is statically 
allocated.
+ */
+const char *
 ip2str (const in_addr_t ip)
 {
   static char hostip[NI_MAXHOST];

Modified: msh/src/util.h
===================================================================
--- msh/src/util.h      2013-09-18 12:02:31 UTC (rev 29370)
+++ msh/src/util.h      2013-09-18 12:03:24 UTC (rev 29371)
@@ -19,13 +19,10 @@
 
 
 /**
- * Creates a new non-blocking socket and binds it to the given address and 
makes
- * it a listen socket
+ * Creates a new socket and connects it to the given address
  *
- * @param addr the address to bind to
+ * @param addr the address to connect to
  * @param addrlen the length of the addr
- * @param backlog the max length of the pending connections.  This will be
- *          passed to listen()
  * @return the socket's fd; -1 on error
  */
 int
@@ -34,7 +31,14 @@
 char *
 saddr2str (const struct sockaddr *addr, const socklen_t addrlen);
 
-char *
+
+/**
+ * Function to convert an 32-bit IP address into numbers-and-dots notation
+ *
+ * @param ip the IP address
+ * @return the string represeting the IP address.  The string is statically 
allocated.
+ */
+const char *
 ip2str (const in_addr_t ip);
 
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]