aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_bluetooth.c
diff options
context:
space:
mode:
authorClaudiu Olteanu <claudiu@140774ce-b5e7-0310-ab8b-a85725594a96>2013-07-21 12:51:38 +0000
committerClaudiu Olteanu <claudiu@140774ce-b5e7-0310-ab8b-a85725594a96>2013-07-21 12:51:38 +0000
commita08467eea5667404d56c7ba8e5bda74aa1ec8451 (patch)
tree6bc80aad6970f061ca7bca1a478d0606b70045f0 /src/transport/plugin_transport_bluetooth.c
parent2904abb26e88eaef03c79e0a6571c6245032a2f1 (diff)
downloadgnunet-a08467eea5667404d56c7ba8e5bda74aa1ec8451.tar.gz
gnunet-a08467eea5667404d56c7ba8e5bda74aa1ec8451.zip
Fixing the function called to convert a string address to a binary address
Diffstat (limited to 'src/transport/plugin_transport_bluetooth.c')
-rw-r--r--src/transport/plugin_transport_bluetooth.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_bluetooth.c b/src/transport/plugin_transport_bluetooth.c
index 3f432b90e..8e7b22b4a 100644
--- a/src/transport/plugin_transport_bluetooth.c
+++ b/src/transport/plugin_transport_bluetooth.c
@@ -1311,7 +1311,7 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
1311 xmas.endpoint = mas->endpoint; 1311 xmas.endpoint = mas->endpoint;
1312 xmas.session = create_session (mas->endpoint, &wlanheader->sender); 1312 xmas.session = create_session (mas->endpoint, &wlanheader->sender);
1313 LOG (GNUNET_ERROR_TYPE_DEBUG, 1313 LOG (GNUNET_ERROR_TYPE_DEBUG,
1314 "Processing %u bytes of WLAN DATA from peer `%s'\n", 1314 "Processing %u bytes of BLUETOOTH DATA from peer `%s'\n",
1315 (unsigned int) msize, 1315 (unsigned int) msize,
1316 GNUNET_i2s (&wlanheader->sender)); 1316 GNUNET_i2s (&wlanheader->sender));
1317 (void) GNUNET_SERVER_mst_receive (plugin->wlan_header_payload_tokenizer, 1317 (void) GNUNET_SERVER_mst_receive (plugin->wlan_header_payload_tokenizer,
@@ -1395,7 +1395,7 @@ handle_helper_message (void *cls, void *client,
1395 plugin->env->notify_address (plugin->env->cls, GNUNET_NO, 1395 plugin->env->notify_address (plugin->env->cls, GNUNET_NO,
1396 &wa, 1396 &wa,
1397 sizeof (wa), 1397 sizeof (wa),
1398 "wlan"); 1398 "bluetooth");
1399 } 1399 }
1400 plugin->mac_address = cm->mac; 1400 plugin->mac_address = cm->mac;
1401 plugin->have_mac = GNUNET_YES; 1401 plugin->have_mac = GNUNET_YES;
@@ -1403,13 +1403,13 @@ handle_helper_message (void *cls, void *client,
1403 wa.mac = plugin->mac_address; 1403 wa.mac = plugin->mac_address;
1404 wa.options = htonl(plugin->options); 1404 wa.options = htonl(plugin->options);
1405 LOG (GNUNET_ERROR_TYPE_DEBUG, 1405 LOG (GNUNET_ERROR_TYPE_DEBUG,
1406 "Received WLAN_HELPER_CONTROL message with MAC address `%s' for peer `%s'\n", 1406 "Received BT_HELPER_CONTROL message with MAC address `%s' for peer `%s'\n",
1407 mac_to_string (&cm->mac), 1407 mac_to_string (&cm->mac),
1408 GNUNET_i2s (plugin->env->my_identity)); 1408 GNUNET_i2s (plugin->env->my_identity));
1409 plugin->env->notify_address (plugin->env->cls, GNUNET_YES, 1409 plugin->env->notify_address (plugin->env->cls, GNUNET_YES,
1410 &wa, 1410 &wa,
1411 sizeof (struct WlanAddress), 1411 sizeof (struct WlanAddress),
1412 "wlan"); 1412 "bluetooth");
1413 break; 1413 break;
1414 case GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER: 1414 case GNUNET_MESSAGE_TYPE_WLAN_DATA_FROM_HELPER:
1415 LOG (GNUNET_ERROR_TYPE_DEBUG, 1415 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1666,7 +1666,7 @@ libgnunet_plugin_transport_bluetooth_done (void *cls)
1666 plugin->env->notify_address (plugin->env->cls, GNUNET_NO, 1666 plugin->env->notify_address (plugin->env->cls, GNUNET_NO,
1667 &wa, 1667 &wa,
1668 sizeof (struct WlanAddress), 1668 sizeof (struct WlanAddress),
1669 "wlan"); 1669 "bluetooth");
1670 plugin->have_mac = GNUNET_NO; 1670 plugin->have_mac = GNUNET_NO;
1671 } 1671 }
1672 1672
@@ -1727,7 +1727,7 @@ bluetooth_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1727 struct WlanAddress *wa; 1727 struct WlanAddress *wa;
1728 unsigned int a[6]; 1728 unsigned int a[6];
1729 unsigned int i; 1729 unsigned int i;
1730 char plugin[5]; 1730 char plugin[10];
1731 uint32_t options; 1731 uint32_t options;
1732 1732
1733 if ((NULL == addr) || (addrlen == 0)) 1733 if ((NULL == addr) || (addrlen == 0))
@@ -1747,7 +1747,7 @@ bluetooth_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1747 } 1747 }
1748 1748
1749 if (8 != SSCANF (addr, 1749 if (8 != SSCANF (addr,
1750 "%4s.%u.%X:%X:%X:%X:%X:%X", 1750 "%9s.%u.%X:%X:%X:%X:%X:%X",
1751 plugin, &options, 1751 plugin, &options,
1752 &a[0], &a[1], &a[2], &a[3], &a[4], &a[5])) 1752 &a[0], &a[1], &a[2], &a[3], &a[4], &a[5]))
1753 { 1753 {
@@ -1803,7 +1803,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1803 (testmode > 2) ) ) 1803 (testmode > 2) ) )
1804 { 1804 {
1805 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, 1805 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
1806 "transport-wlan", "TESTMODE"); 1806 "transport-bluetooth", "TESTMODE");
1807 return NULL; 1807 return NULL;
1808 } 1808 }
1809 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-transport-bluetooth"); 1809 binary = GNUNET_OS_get_libexec_binary_path ("gnunet-helper-transport-bluetooth");
@@ -1811,7 +1811,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1811 (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) ) 1811 (GNUNET_YES != GNUNET_OS_check_helper_binary (binary, GNUNET_YES, NULL)) )
1812 { 1812 {
1813 LOG (GNUNET_ERROR_TYPE_ERROR, 1813 LOG (GNUNET_ERROR_TYPE_ERROR,
1814 _("Helper binary `%s' not SUID, cannot run WLAN transport\n"), 1814 _("Helper binary `%s' not SUID, cannot run bluetooth transport\n"),
1815 "gnunet-helper-transport-bluetooth"); 1815 "gnunet-helper-transport-bluetooth");
1816 GNUNET_free (binary); 1816 GNUNET_free (binary);
1817 return NULL; 1817 return NULL;