aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 6f5c66ad3..1fafc4070 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -777,7 +777,7 @@ create_session (struct MacEndpoint *endpoint,
777 777
778 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# WLAN sessions allocated"), 1, 778 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, _("# WLAN sessions allocated"), 1,
779 GNUNET_NO); 779 GNUNET_NO);
780 session = GNUNET_malloc (sizeof (struct Session)); 780 session = GNUNET_new (struct Session);
781 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head, 781 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head,
782 endpoint->sessions_tail, 782 endpoint->sessions_tail,
783 session); 783 session);
@@ -974,7 +974,7 @@ send_with_fragmentation (struct MacEndpoint *endpoint,
974 struct Plugin *plugin; 974 struct Plugin *plugin;
975 975
976 plugin = endpoint->plugin; 976 plugin = endpoint->plugin;
977 fm = GNUNET_malloc (sizeof (struct FragmentMessage)); 977 fm = GNUNET_new (struct FragmentMessage);
978 fm->macendpoint = endpoint; 978 fm->macendpoint = endpoint;
979 fm->target = *target; 979 fm->target = *target;
980 fm->size_payload = payload_size; 980 fm->size_payload = payload_size;
@@ -1079,7 +1079,7 @@ create_macendpoint (struct Plugin *plugin,
1079 for (pos = plugin->mac_head; NULL != pos; pos = pos->next) 1079 for (pos = plugin->mac_head; NULL != pos; pos = pos->next)
1080 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress))) 1080 if (0 == memcmp (addr, &pos->addr, sizeof (struct WlanAddress)))
1081 return pos; 1081 return pos;
1082 pos = GNUNET_malloc (sizeof (struct MacEndpoint)); 1082 pos = GNUNET_new (struct MacEndpoint);
1083 pos->addr = *addr; 1083 pos->addr = *addr;
1084 pos->plugin = plugin; 1084 pos->plugin = plugin;
1085 pos->defrag = 1085 pos->defrag =
@@ -1846,7 +1846,7 @@ wlan_string_to_address (void *cls, const char *addr, uint16_t addrlen,
1846 GNUNET_break (0); 1846 GNUNET_break (0);
1847 return GNUNET_SYSERR; 1847 return GNUNET_SYSERR;
1848 } 1848 }
1849 wa = GNUNET_malloc (sizeof (struct WlanAddress)); 1849 wa = GNUNET_new (struct WlanAddress);
1850 for (i=0;i<6;i++) 1850 for (i=0;i<6;i++)
1851 wa->mac.mac[i] = a[i]; 1851 wa->mac.mac[i] = a[i];
1852 wa->options = htonl (0); 1852 wa->options = htonl (0);
@@ -1889,7 +1889,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
1889 { 1889 {
1890 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully 1890 /* run in 'stub' mode (i.e. as part of gnunet-peerinfo), don't fully
1891 initialze the plugin or the API */ 1891 initialze the plugin or the API */
1892 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1892 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1893 api->cls = NULL; 1893 api->cls = NULL;
1894 api->address_pretty_printer = &wlan_plugin_address_pretty_printer; 1894 api->address_pretty_printer = &wlan_plugin_address_pretty_printer;
1895 api->address_to_string = &wlan_plugin_address_to_string; 1895 api->address_to_string = &wlan_plugin_address_to_string;
@@ -1931,7 +1931,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
1931 return NULL; 1931 return NULL;
1932 } 1932 }
1933 1933
1934 plugin = GNUNET_malloc (sizeof (struct Plugin)); 1934 plugin = GNUNET_new (struct Plugin);
1935 plugin->interface = interface; 1935 plugin->interface = interface;
1936 plugin->env = env; 1936 plugin->env = env;
1937 GNUNET_STATISTICS_set (plugin->env->stats, _("# WLAN sessions allocated"), 1937 GNUNET_STATISTICS_set (plugin->env->stats, _("# WLAN sessions allocated"),
@@ -1989,7 +1989,7 @@ libgnunet_plugin_transport_wlan_init (void *cls)
1989 GNUNET_assert (0); 1989 GNUNET_assert (0);
1990 } 1990 }
1991 1991
1992 api = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_PluginFunctions)); 1992 api = GNUNET_new (struct GNUNET_TRANSPORT_PluginFunctions);
1993 api->cls = plugin; 1993 api->cls = plugin;
1994 api->send = &wlan_plugin_send; 1994 api->send = &wlan_plugin_send;
1995 api->get_session = &wlan_plugin_get_session; 1995 api->get_session = &wlan_plugin_get_session;