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)
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);