Extending the testcases to use bluetooth
[oweals/gnunet.git] / src / transport / plugin_transport_unix.c
index 3f64e5c1941a4d8c56e7ca2e5c63d34bd1def43c..19a4d8e601aa2c616bdbbe4875bee430a758f7b5 100644 (file)
@@ -732,6 +732,7 @@ session_timeout (void *cls,
   disconnect_session (s);
 }
 
+
 /**
  * Function obtain the network type for a session
  *
@@ -740,10 +741,11 @@ session_timeout (void *cls,
  * @return the network type in HBO or GNUNET_SYSERR
  */
 static enum GNUNET_ATS_Network_Type
-unix_get_network (void *cls, void *session)
+unix_get_network (void *cls, 
+                 struct Session *session)
 {
-       GNUNET_assert (NULL != session);
-       return GNUNET_ATS_NET_LOOPBACK;
+  GNUNET_assert (NULL != session);
+  return GNUNET_ATS_NET_LOOPBACK;
 }
 
 
@@ -1041,6 +1043,7 @@ unix_plugin_select_read (struct Plugin *plugin)
   if ((csize < sizeof (struct UNIXMessage)) || (csize > ret))
   {
     GNUNET_break_op (0);
+    GNUNET_free (ua);
     return;
   }
   msgbuf = (char *) &msg[1];
@@ -1292,7 +1295,7 @@ unix_address_to_string (void *cls, const void *addr, size_t addrlen)
 
        if (0 == addrlen)
        {
-               GNUNET_snprintf(rbuf, sizeof (rbuf), "%s", "<inbound>");
+               GNUNET_snprintf(rbuf, sizeof (rbuf), "%s", TRANSPORT_SESSION_INBOUND_STRING);
        }
   if ((NULL == addr) || (sizeof (struct UnixAddress) > addrlen))
   {
@@ -1399,7 +1402,7 @@ unix_plugin_address_pretty_printer (void *cls, const char *type,
   }
   else if (0 == addrlen)
   {
-    asc (asc_cls, "<inbound>");
+    asc (asc_cls, TRANSPORT_SESSION_INBOUND_STRING);
   }
   else
   {