stuff
[oweals/gnunet.git] / src / transport / plugin_transport_wlan.c
index d9052206290ff018f4ba78a64e612a4c9d49ef4d..2f32b53c2803ce17a7845e1692eb9cf27f0581c4 100644 (file)
@@ -1353,8 +1353,10 @@ send_hello_beacon(struct Plugin * plugin)
   struct ieee80211_frame * ieeewlanheader;
   struct Radiotap_Send * radioHeader;
   struct GNUNET_MessageHeader * msgheader2;
+  const struct GNUNET_MessageHeader *hello;
 
-  hallo_size = GNUNET_HELLO_size(*(plugin->env->our_hello));
+  hello = plugin->env->get_our_hello ();
+  hallo_size = GNUNET_HELLO_size(hello);
   GNUNET_assert(sizeof(struct WlanHeader) + hallo_size <= WLAN_MTU);
   size = sizeof(struct GNUNET_MessageHeader) + sizeof(struct Radiotap_Send)
       + sizeof(struct ieee80211_frame) + sizeof(struct GNUNET_MessageHeader)
@@ -1370,12 +1372,11 @@ send_hello_beacon(struct Plugin * plugin)
   getWlanHeader(ieeewlanheader, &bc_all_mac, plugin, size);
 
   msgheader2 = (struct GNUNET_MessageHeader*) &ieeewlanheader[1];
-  msgheader2->size = htons(
-      GNUNET_HELLO_size(*(plugin->env->our_hello))
+  msgheader2->size = htons(GNUNET_HELLO_size(hello)
           + sizeof(struct GNUNET_MessageHeader));
 
   msgheader2->type = htons(GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT);
-  memcpy(&msgheader2[1], *plugin->env->our_hello, hallo_size);
+  memcpy(&msgheader2[1], hello, hallo_size);
 
   bytes = GNUNET_DISK_file_write(plugin->server_stdin_handle, msgheader, size);