[torquedev] mom_priv/config line length limit, OS X struct differences

Neil Hodgson neil.hodgson at sirca.org.au
Thu Feb 5 23:35:11 MST 2009


Garrick Staples:

> Can you provide a patch?

    Patch attached to this message and also inline.

diff -u --recursive torque-2.3.6/src/lib/Libnet/net_client.c 
torque-memset/src/lib/Libnet/net_client.c
--- torque-2.3.6/src/lib/Libnet/net_client.c    2008-11-11 
10:41:53.000000000 +1100
+++ torque-memset/src/lib/Libnet/net_client.c   2009-02-06 
14:52:40.000000000 +1100
@@ -205,6 +205,9 @@

    errno = 0;

+  memset(&local, 0, sizeof(local));
+  memset(&remote, 0, sizeof(remote));
+
    local.sin_family      = AF_INET;

    local.sin_addr.s_addr = 0;
diff -u --recursive torque-2.3.6/src/lib/Libnet/net_server.c 
torque-memset/src/lib/Libnet/net_server.c
--- torque-2.3.6/src/lib/Libnet/net_server.c    2008-12-12 
07:05:55.000000000 +1100
+++ torque-memset/src/lib/Libnet/net_server.c   2009-02-06 
14:54:16.000000000 +1100
@@ -245,7 +245,10 @@

    struct sockaddr_un unsocname;
    int unixsocket;
+  memset(&unsocname, 0, sizeof(unsocname));
  #endif
+
+  memset(&socname, 0, sizeof(socname));

    if (initialized == 0)
      {

    Neil

-------------- next part --------------
diff -u --recursive torque-2.3.6/src/lib/Libnet/net_client.c torque-memset/src/lib/Libnet/net_client.c
--- torque-2.3.6/src/lib/Libnet/net_client.c    2008-11-11 10:41:53.000000000 +1100
+++ torque-memset/src/lib/Libnet/net_client.c   2009-02-06 14:52:40.000000000 +1100
@@ -205,6 +205,9 @@
 
   errno = 0;
 
+  memset(&local, 0, sizeof(local));
+  memset(&remote, 0, sizeof(remote));
+
   local.sin_family      = AF_INET;
 
   local.sin_addr.s_addr = 0;
diff -u --recursive torque-2.3.6/src/lib/Libnet/net_server.c torque-memset/src/lib/Libnet/net_server.c
--- torque-2.3.6/src/lib/Libnet/net_server.c    2008-12-12 07:05:55.000000000 +1100
+++ torque-memset/src/lib/Libnet/net_server.c   2009-02-06 14:54:16.000000000 +1100
@@ -245,7 +245,10 @@
 
   struct sockaddr_un unsocname;
   int unixsocket;
+  memset(&unsocname, 0, sizeof(unsocname));
 #endif
+ 
+  memset(&socname, 0, sizeof(socname));
 
   if (initialized == 0)
     {


More information about the torquedev mailing list