-allow caller ID to differ from zone used for resolution
[oweals/gnunet.git] / src / transport / plugin_transport_bluetooth.c
index 8d751f443e07b7e46074b41e6ddf15c0e136f1b3..aad96cf6965a5c9b85c8eb612c3f85cf5977badd 100644 (file)
@@ -661,7 +661,7 @@ free_session (struct Session *session)
   struct PendingMessage *pm;
 
   endpoint->plugin->env->session_end (endpoint->plugin->env->cls,
-                                     &session->target,
+                                     session->address,
                                      session);
   while (NULL != (pm = session->pending_message_head))
   {
@@ -1719,15 +1719,15 @@ bluetooth_plugin_address_pretty_printer (void *cls, const char *type,
   if (sizeof (struct WlanAddress) != addrlen)
   {
     /* invalid address  */
-    LOG (GNUNET_ERROR_TYPE_WARNING,
-        _("Bluetooth address with invalid size encountered\n"));
-    asc (asc_cls, NULL);
-    return;
+    asc (asc_cls, NULL, GNUNET_SYSERR);
+  }
+  else
+  {
+    ret = GNUNET_strdup (bluetooth_plugin_address_to_string(NULL, addr, addrlen));
+    asc (asc_cls, ret, GNUNET_OK);
+    GNUNET_free (ret);
   }
-  ret = GNUNET_strdup (bluetooth_plugin_address_to_string(NULL, addr, addrlen));
-  asc (asc_cls, ret);
-  GNUNET_free (ret);
-  asc (asc_cls, NULL);
+  asc (asc_cls, NULL, GNUNET_OK);
 }
 
 
@@ -1943,7 +1943,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
                          0, GNUNET_NO);
   GNUNET_STATISTICS_set (plugin->env->stats, _("# Bluetooth MAC endpoints allocated"),
                          0, 0);
-  GNUNET_BANDWIDTH_tracker_init (&plugin->tracker,
+  GNUNET_BANDWIDTH_tracker_init (&plugin->tracker, NULL, NULL,
                                  GNUNET_BANDWIDTH_value_init (100 * 1024 *
                                                               1024 / 8), 100);
   plugin->fragment_data_tokenizer = GNUNET_SERVER_mst_create (&process_data, plugin);