aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_bluetooth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_bluetooth.c')
-rw-r--r--src/transport/plugin_transport_bluetooth.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_bluetooth.c b/src/transport/plugin_transport_bluetooth.c
index 51e8a89bd..a7d3cf3f5 100644
--- a/src/transport/plugin_transport_bluetooth.c
+++ b/src/transport/plugin_transport_bluetooth.c
@@ -730,7 +730,7 @@ create_session (struct MacEndpoint *endpoint,
730 } 730 }
731 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# Bluetooth sessions allocated"), 1, 731 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# Bluetooth sessions allocated"), 1,
732 GNUNET_NO); 732 GNUNET_NO);
733 session = GNUNET_malloc (sizeof (struct Session)); 733 session = GNUNET_new (struct Session);
734 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head, 734 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head,
735 endpoint->sessions_tail, 735 endpoint->sessions_tail,
736 session); 736 session);
@@ -897,7 +897,7 @@ send_with_fragmentation (struct MacEndpoint *endpoint,
897 struct Plugin *plugin; 897 struct Plugin *plugin;
898 898
899 plugin = endpoint->plugin; 899 plugin = endpoint->plugin;
900 fm = GNUNET_malloc (sizeof (struct FragmentMessage)); 900 fm = GNUNET_new (struct FragmentMessage);
901 fm->macendpoint = endpoint; 901 fm->macendpoint = endpoint;
902 fm->target = *target; 902 fm->target = *target;
903 fm->size_payload = payload_size; 903 fm->size_payload = payload_size;
@@ -1001,7 +1001,7 @@ create_macendpoint (struct Plugin *plugin,
1001 for (pos = plugin->mac_head; NULL != pos; pos = pos->next) 1001 for (pos = plugin->mac_head; NULL != pos; pos = pos->next)
1002 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress))) 1002 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress)))
1003 return pos; 1003 return pos;
1004 pos = GNUNET_malloc (sizeof (struct MacEndpoint)); 1004 pos = GNUNET_new (struct MacEndpoint);
1005 pos->addr = *addr; 1005 pos->addr = *addr;
1006 pos->plugin = plugin; 1006 pos->plugin = plugin;
1007 pos->defrag = 1007 pos->defrag =
@@ -1790,7 +1790,7 @@ bluetooth_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1790 GNUNET_break (0); 1790 GNUNET_break (0);
1791 return GNUNET_SYSERR; 1791 return GNUNET_SYSERR;
1792 } 1792 }
1793 wa = GNUNET_malloc (sizeof (struct WlanAddress)); 1793 wa = GNUNET_new (struct WlanAddress);
1794 for (i=0;i<6;i++) 1794 for (i=0;i<6;i++)
1795 wa->mac.mac[i] = a[i]; 1795 wa->mac.mac[i] = a[i];
1796 wa->options = htonl (0); 1796 wa->options = htonl (0);
@@ -1833,7 +1833,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1833 { 1833 {
1834 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully 1834 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully
1835 initialze the plugin or the API */ 1835 initialze the plugin or the API */
1836 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1836 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1837 api->cls = NULL; 1837 api->cls = NULL;
1838 api->address_pretty_printer = &bluetooth_plugin_address_pretty_printer; 1838 api->address_pretty_printer = &bluetooth_plugin_address_pretty_printer;
1839 api->address_to_string = &bluetooth_plugin_address_to_string; 1839 api->address_to_string = &bluetooth_plugin_address_to_string;
@@ -1875,7 +1875,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1875 return NULL; 1875 return NULL;
1876 } 1876 }
1877 1877
1878 plugin = GNUNET_malloc (sizeof (struct Plugin)); 1878 plugin = GNUNET_new (struct Plugin);
1879 plugin->interface = interface; 1879 plugin->interface = interface;
1880 plugin->env = env; 1880 plugin->env = env;
1881 GNUNET_STATISTICS_set (plugin->env->stats, _("# Bluetooth sessions allocated"), 1881 GNUNET_STATISTICS_set (plugin->env->stats, _("# Bluetooth sessions allocated"),
@@ -1933,7 +1933,7 @@ libgnunet_plugin_transport_bluetooth_init (void *cls)
1933 GNUNET_assert (0); 1933 GNUNET_assert (0);
1934 } 1934 }
1935 1935
1936 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1936 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1937 api->cls = plugin; 1937 api->cls = plugin;
1938 api->send = &bluetooth_plugin_send; 1938 api->send = &bluetooth_plugin_send;
1939 api->get_session = &bluetooth_plugin_get_session; 1939 api->get_session = &bluetooth_plugin_get_session;