gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r993 - in GNUnet: . m4 src/transports


From: grothoff
Subject: [GNUnet-SVN] r993 - in GNUnet: . m4 src/transports
Date: Fri, 24 Jun 2005 16:05:30 -0700 (PDT)

Author: grothoff
Date: 2005-06-24 16:05:23 -0700 (Fri, 24 Jun 2005)
New Revision: 993

Added:
   GNUnet/README.debian
Modified:
   GNUnet/Makefile.am
   GNUnet/m4/Makefile.in
   GNUnet/src/transports/tcp6.c
   GNUnet/src/transports/udp6.c
Log:
some code cleanup, and a README for debian developers

Modified: GNUnet/Makefile.am
===================================================================
--- GNUnet/Makefile.am  2005-06-24 21:13:53 UTC (rev 992)
+++ GNUnet/Makefile.am  2005-06-24 23:05:23 UTC (rev 993)
@@ -5,6 +5,7 @@
  ABOUT-NLS \
  config.rpath  \
  README.fr \
+ README.debian \
  UPDATING \
  PLATFORMS \
  acinclude.m4

Added: GNUnet/README.debian
===================================================================
--- GNUnet/README.debian        2005-06-24 21:13:53 UTC (rev 992)
+++ GNUnet/README.debian        2005-06-24 23:05:23 UTC (rev 993)
@@ -0,0 +1,70 @@
+This is a list of debian (sarge) packages that you may want to install
+prior to compiling GNUnet.
+
+Since sarge does not include libextractor 0.5.x, you will also have to
+compile libextractor by hand.  The following list of packages (and
+their dependencies) is what is needed for a complete installation of
+GNUnet and libextractor (to the best of our knowledge):
+
+=====================================================================
+
+Basic compilation tools:
+
+libtool
+gcc
+make
+g++ (for libextractor)
+
+
+GNUnet library dependencies:
+
+libgcrypt11-dev
+libgmp3-dev
+libltdl3-dev
+libgtk2.0-dev
+libsqlite3-dev
+libmysqlclient14-dev
+# libextractor1-dev (not in sarge)
+
+
+Additional libextractor dependencies:
+
+libvorbis-dev
+zlib1g-dev
+python2.3-dev
+libgcj-dev
+
+
+Additional gnunet-gtk dependencies:
+
+libglade2-dev
+
+
+For running GNUnet with the MySQL database:
+
+mysql-server-4.1 
+mysql-client-4.1 (for administration)
+
+
+For gnunet-download-manager (probably no longer needed):
+
+guile-1.6
+
+
+For Subversion access and compilation:
+
+subversion
+autoconf
+automake1.4
+
+
+For changing gnunet-gtk glade user interface (development):
+
+glade-2
+
+
+==============================================
+
+Please notify us if we missed some dependencies
+(note that the list is supposed to only list direct
+dependencies, not transitive dependencies).

Modified: GNUnet/m4/Makefile.in
===================================================================
--- GNUnet/m4/Makefile.in       2005-06-24 21:13:53 UTC (rev 992)
+++ GNUnet/m4/Makefile.in       2005-06-24 23:05:23 UTC (rev 993)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.8.5 from Makefile.am.
+# Makefile.in generated by automake 1.9.5 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004  Free Software Foundation, Inc.
+# 2003, 2004, 2005  Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -33,6 +33,7 @@
 NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
+build_triplet = @build@
 host_triplet = @host@
 subdir = m4
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
@@ -183,6 +184,8 @@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
 bindir = @bindir@
 build = @build@
 build_alias = @build_alias@
@@ -349,7 +352,7 @@
 clean-generic:
 
 distclean-generic:
-       -rm -f $(CONFIG_CLEAN_FILES)
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
 
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"

Modified: GNUnet/src/transports/tcp6.c
===================================================================
--- GNUnet/src/transports/tcp6.c        2005-06-24 21:13:53 UTC (rev 992)
+++ GNUnet/src/transports/tcp6.c        2005-06-24 23:05:23 UTC (rev 993)
@@ -650,14 +650,13 @@
             otherwise we just close and reject the communication! */   
          GNUNET_ASSERT(sizeof(struct in6_addr) == sizeof(IP6addr));
          if (YES == isBlacklisted((IP6addr*)&clientAddr.sin6_addr)) {
-           char * tmp = MALLOC(INET6_ADDRSTRLEN);
+           char inet6[INET6_ADDRSTRLEN];
            LOG(LOG_INFO,
                _("Rejected blacklisted connection from address %s.\n"),
                inet_ntop(AF_INET6,
                          &clientAddr,
-                         tmp,
+                         inet6,
                          INET6_ADDRSTRLEN));
-           FREE(tmp);
            SHUTDOWN(sock, 2);
            closefile(sock);
          } else
@@ -982,14 +981,10 @@
   int sock;
   TSession * tsession;
   TCP6Session * tcp6Session;
-  char * hostname;
+  char hostname[INET6_ADDRSTRLEN];
   struct addrinfo hints, *res, *res0;
   int rtn;
 
-#if DEBUG_TCP6
-  char * tmp;
-#endif
-
   if (tcp6_shutdown == YES)
     return SYSERR;
   haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
@@ -997,13 +992,11 @@
   memset(&hints, 0, sizeof(hints));
   hints.ai_family = PF_INET6;
   hints.ai_socktype = SOCK_STREAM;
-  hostname = MALLOC(INET6_ADDRSTRLEN);
   inet_ntop(AF_INET6,
            haddr,
            hostname,
            INET6_ADDRSTRLEN);
   rtn = getaddrinfo(hostname, NULL, &hints, &res0);
-  FREE(hostname);
   if (rtn != 0) {
     LOG(LOG_WARNING,   
        _("'%s': unknown service: %s\n"),
@@ -1013,15 +1006,13 @@
   }
 
 #if DEBUG_TCP6
-  tmp = MALLOC(INET6_ADDRSTRLEN);
   LOG(LOG_DEBUG,
       "Creating TCP6 connection to %s:%d\n",
       inet_ntop(AF_INET6,
                haddr,
-               tmp,
+               &hostname,
                INET6_ADDRSTRLEN),
       ntohs(haddr->port));
-  FREE(tmp);
 #endif
 
   sock = -1;
@@ -1288,21 +1279,19 @@
  */
 static char * addressToString(const HELO_Message * helo) {
   char * ret;
-  char * tmp;
+  char inet6[INET6_ADDRSTRLEN];
   Host6Address * haddr;
 
   haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   ret = MALLOC(INET6_ADDRSTRLEN+16);
-  tmp = MALLOC(INET6_ADDRSTRLEN);
   SNPRINTF(ret,
           INET6_ADDRSTRLEN+16,
           "%s:%d (TCP6)",
           inet_ntop(AF_INET6,
                     haddr,
-                    tmp,
+                    inet6,
                     INET6_ADDRSTRLEN),
           ntohs(haddr->port));
-  FREE(tmp);
   return ret;
 }
 

Modified: GNUnet/src/transports/udp6.c
===================================================================
--- GNUnet/src/transports/udp6.c        2005-06-24 21:13:53 UTC (rev 992)
+++ GNUnet/src/transports/udp6.c        2005-06-24 23:05:23 UTC (rev 993)
@@ -186,7 +186,7 @@
   EncName enc;
   MessagePack * mp;
   UDP6Message udp6m;
-  char * tmp;
+  char inet6[INET6_ADDRSTRLEN];
 
   SEMAPHORE_UP(serverSignal);
   while (udp6_shutdown == NO) {
@@ -223,15 +223,13 @@
     }
     incrementBytesReceived(size);
     if ((unsigned int)size <= sizeof(UDP6Message)) {
-      char * tmp = MALLOC(INET6_ADDRSTRLEN);
       LOG(LOG_INFO,
          _("Received invalid UDP6 message from %s:%d, dropping.\n"),
          inet_ntop(AF_INET6,
                    &incoming,
-                   tmp,
+                   inet6,
                    INET6_ADDRSTRLEN),
          ntohs(incoming.sin6_port));
-      FREE(tmp);
       goto RETRY;
     }
     memcpy(&udp6m,
@@ -242,41 +240,35 @@
          hash2enc(&udp6m.sender.hashPubKey,
                   &enc));
 #if DEBUG_UDP6
-    tmp = MALLOC(INET6_ADDRSTRLEN);
     LOG(LOG_DEBUG,
        "Received %d bytes via UDP6 from %s:%d (%s).\n",
        size,
        inet_ntop(AF_INET6,
                  &incoming,
-                 tmp,
+                 inet6,
                  INET6_ADDRSTRLEN),
        ntohs(incoming.sin6_port),
        &enc);
-    FREE(tmp);
 #endif
     /* quick test of the packet, if failed, repeat! */
     if (size != ntohs(udp6m.size)) {
-      tmp = MALLOC(INET6_ADDRSTRLEN);
       LOG(LOG_WARNING,
          _("Packet received from %s:%d (UDP6) failed format check."),
          inet_ntop(AF_INET6,
                    &incoming,
-                   tmp,
+                   inet6,
                    INET6_ADDRSTRLEN),
          ntohs(incoming.sin6_port));
-      FREE(tmp);
       goto RETRY;
     }
     GNUNET_ASSERT(sizeof(struct in6_addr) == sizeof(IP6addr));
     if (YES == isBlacklisted((IP6addr*)&incoming.sin6_addr)) {
-      char * tmp = MALLOC(INET6_ADDRSTRLEN);
       LOG(LOG_WARNING,
          _("Sender %s is blacklisted, dropping message.\n"),
          inet_ntop(AF_INET6,
                    &incoming,
-                   tmp,
+                   inet6,
                    INET6_ADDRSTRLEN));
-      FREE(tmp);
       goto RETRY; /* drop on the floor */
     }
     /* message ok, fill in mp and pass to core */
@@ -315,15 +307,14 @@
     return SYSERR; /* obviously invalid */
   else {
 #if DEBUG_UDP6
-    char * tmp = MALLOC(INET6_ADDRSTRLEN);
+    char inet6[INET6_ADDRSTRLEN];
     LOG(LOG_DEBUG,
        "Verified UDP6 helo from %u.%u.%u.%u:%u.\n",
        inet_ntop(AF_INET6,
                  &haddr->senderIP,
-                 tmp,
+                 inet6,
                  INET6_ADDRSTRLEN),
        ntohs(haddr->senderPort));
-    FREE(tmp);
 #endif
     return OK;
   }
@@ -431,7 +422,7 @@
   int ok;
   int ssize;
 #if DEBUG_UDP6
-  char * tmp;
+  char inet6[INET6_ADDRSTRLEN];
 #endif
 
   if (udp6_shutdown == YES)
@@ -469,16 +460,14 @@
         &haddr->senderIP.addr,
         sizeof(IP6addr));
 #if DEBUG_UDP6
-  tmp = MALLOC(INET6_ADDRSTRLEN);
   LOG(LOG_DEBUG,
       "Sending message of %d bytes via UDP6 to %s:%d..\n",
       ssize,
       inet_ntop(AF_INET6,
                &sin,
-               tmp,
+               inet6,
                INET6_ADDRSTRLEN),
       ntohs(sin.sin_port));
-  FREE(tmp);
 #endif
   if (ssize == SENDTO(udp6_sock,
                      msg,
@@ -597,21 +586,19 @@
  */
 static char * addressToString(const HELO_Message * helo) {
   char * ret;
-  char * tmp;
+  char inet6[INET6_ADDRSTRLEN];
   Host6Address * haddr;
 
   haddr = (Host6Address*) &((HELO_Message_GENERIC*)helo)->senderAddress[0];
   ret = MALLOC(INET6_ADDRSTRLEN+16);
-  tmp = MALLOC(INET6_ADDRSTRLEN);
   SNPRINTF(ret,
           INET6_ADDRSTRLEN+16,
           "%s:%d (UDP6)",
           inet_ntop(AF_INET6,
                     haddr,
-                    tmp,
+                    inet6,
                     INET6_ADDRSTRLEN),
           ntohs(haddr->senderPort));
-  FREE(tmp);
   return ret;
 }
 





reply via email to

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