aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.c
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2012-04-27 13:44:49 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2012-04-27 13:44:49 +0000
commitfc1e8e4d47fe8242e361bfb44ef6048dddee886f (patch)
treeacfa3293f01c4752bff8a00195d51bd846be5797 /src/transport/plugin_transport_unix.c
parentf6eef5e44e099e73d1666f8b0dfcf966503afba4 (diff)
downloadgnunet-fc1e8e4d47fe8242e361bfb44ef6048dddee886f.tar.gz
gnunet-fc1e8e4d47fe8242e361bfb44ef6048dddee886f.zip
working string toaddress
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 9027c2773..a195fb7f8 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1034,14 +1034,14 @@ unix_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1034 return GNUNET_SYSERR; 1034 return GNUNET_SYSERR;
1035 } 1035 }
1036 1036
1037 if ((strlen (addr) + 1) != addrlen) 1037 char * tmp = GNUNET_malloc (addrlen + 1);
1038 { 1038 memcpy (tmp, addr, addrlen);
1039 GNUNET_break (0); 1039 tmp[addrlen] = '\0';
1040 return GNUNET_SYSERR; 1040
1041 } 1041 //GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "`%s'\n", tmp);
1042 1042
1043 (*buf) = GNUNET_strdup (addr); 1043 (*buf) = tmp;
1044 (*added) = strlen (addr) + 1; 1044 (*added) = strlen (tmp);
1045 return GNUNET_OK; 1045 return GNUNET_OK;
1046} 1046}
1047 1047