diff options
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 88 |
1 files changed, 45 insertions, 43 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index c012e950c..6d06b1af1 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -1905,7 +1905,7 @@ wlan_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target, | |||
1905 | session, newmsg->message_size); | 1905 | session, newmsg->message_size); |
1906 | #endif | 1906 | #endif |
1907 | #if DEBUG_wlan_msg_dump | 1907 | #if DEBUG_wlan_msg_dump |
1908 | hexdump(msgbuf,GNUNET_MIN(msgbuf_size, 256)); | 1908 | hexdump (msgbuf, GNUNET_MIN (msgbuf_size, 256)); |
1909 | #endif | 1909 | #endif |
1910 | //queue session | 1910 | //queue session |
1911 | queue_session (plugin, session); | 1911 | queue_session (plugin, session); |
@@ -2239,7 +2239,8 @@ wlan_data_message_handler (void *cls, const struct GNUNET_MessageHeader *hdr) | |||
2239 | else | 2239 | else |
2240 | { | 2240 | { |
2241 | GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, PLUGIN_LOG_NAME, | 2241 | GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, PLUGIN_LOG_NAME, |
2242 | "wlan_data_message_handler got wrong message type: %u\n", ntohs (hdr->size)); | 2242 | "wlan_data_message_handler got wrong message type: %u\n", |
2243 | ntohs (hdr->size)); | ||
2243 | return; | 2244 | return; |
2244 | } | 2245 | } |
2245 | } | 2246 | } |
@@ -2665,12 +2666,11 @@ wlan_process_helper (void *cls, void *client, | |||
2665 | #if DEBUG_wlan | 2666 | #if DEBUG_wlan |
2666 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, | 2667 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME, |
2667 | "Func wlan_process_helper got unknown message with number %u, size %u\n", | 2668 | "Func wlan_process_helper got unknown message with number %u, size %u\n", |
2668 | ntohs (hdr->type), | 2669 | ntohs (hdr->type), ntohs (hdr->size)); |
2669 | ntohs (hdr->size)); | ||
2670 | 2670 | ||
2671 | #endif | 2671 | #endif |
2672 | #if DEBUG_wlan_msg_dump | 2672 | #if DEBUG_wlan_msg_dump |
2673 | hexdump(hdr,GNUNET_MIN(ntohs (hdr->size), 256)); | 2673 | hexdump (hdr, GNUNET_MIN (ntohs (hdr->size), 256)); |
2674 | #endif | 2674 | #endif |
2675 | GNUNET_break (0); | 2675 | GNUNET_break (0); |
2676 | return; | 2676 | return; |
@@ -2754,25 +2754,25 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin, int testmode) | |||
2754 | filenamehw, plugin->interface, testmode); | 2754 | filenamehw, plugin->interface, testmode); |
2755 | #endif | 2755 | #endif |
2756 | 2756 | ||
2757 | if (GNUNET_OS_check_helper_binary(filenamehw) == GNUNET_YES) | 2757 | if (GNUNET_OS_check_helper_binary (filenamehw) == GNUNET_YES) |
2758 | { | 2758 | { |
2759 | plugin->server_proc = | 2759 | plugin->server_proc = |
2760 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, | 2760 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, |
2761 | filenamehw, filenamehw, plugin->interface, | 2761 | filenamehw, filenamehw, plugin->interface, |
2762 | NULL); | 2762 | NULL); |
2763 | } | 2763 | } |
2764 | else if (GNUNET_OS_check_helper_binary(filenamehw) == GNUNET_NO) | 2764 | else if (GNUNET_OS_check_helper_binary (filenamehw) == GNUNET_NO) |
2765 | { | 2765 | { |
2766 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, | 2766 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, |
2767 | "gnunet-transport-wlan-helper is not suid, please change it or look at the doku\n"); | 2767 | "gnunet-transport-wlan-helper is not suid, please change it or look at the doku\n"); |
2768 | GNUNET_break(0); | 2768 | GNUNET_break (0); |
2769 | } | 2769 | } |
2770 | else | 2770 | else |
2771 | { | 2771 | { |
2772 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, | 2772 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, |
2773 | "gnunet-transport-wlan-helper not found, please look if it exists and is the $PATH variable!\n"); | 2773 | "gnunet-transport-wlan-helper not found, please look if it exists and is the $PATH variable!\n"); |
2774 | GNUNET_break(0); | 2774 | GNUNET_break (0); |
2775 | } | 2775 | } |
2776 | 2776 | ||
2777 | } | 2777 | } |
2778 | else if (testmode == 1) | 2778 | else if (testmode == 1) |
@@ -2784,18 +2784,19 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin, int testmode) | |||
2784 | filenameloopback, plugin->interface, testmode); | 2784 | filenameloopback, plugin->interface, testmode); |
2785 | #endif | 2785 | #endif |
2786 | 2786 | ||
2787 | if (GNUNET_OS_check_helper_binary(filenameloopback) != GNUNET_SYSERR) | 2787 | if (GNUNET_OS_check_helper_binary (filenameloopback) != GNUNET_SYSERR) |
2788 | { | 2788 | { |
2789 | plugin->server_proc = | 2789 | plugin->server_proc = |
2790 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, | 2790 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, |
2791 | filenameloopback, filenameloopback, "1", NULL); | 2791 | filenameloopback, filenameloopback, "1", |
2792 | } | 2792 | NULL); |
2793 | } | ||
2793 | else | 2794 | else |
2794 | { | 2795 | { |
2795 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, | 2796 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, |
2796 | "gnunet-transport-wlan-helper-dummy not found, please look if it exists and is the $PATH variable!\n"); | 2797 | "gnunet-transport-wlan-helper-dummy not found, please look if it exists and is the $PATH variable!\n"); |
2797 | GNUNET_break(0); | 2798 | GNUNET_break (0); |
2798 | } | 2799 | } |
2799 | } | 2800 | } |
2800 | else if (testmode == 2) | 2801 | else if (testmode == 2) |
2801 | { | 2802 | { |
@@ -2804,18 +2805,19 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin, int testmode) | |||
2804 | "Starting gnunet-wlan-helper loopback 2 process cmd: %s %s %i\n", | 2805 | "Starting gnunet-wlan-helper loopback 2 process cmd: %s %s %i\n", |
2805 | filenameloopback, plugin->interface, testmode); | 2806 | filenameloopback, plugin->interface, testmode); |
2806 | #endif | 2807 | #endif |
2807 | if (GNUNET_OS_check_helper_binary(filenameloopback) != GNUNET_SYSERR) | 2808 | if (GNUNET_OS_check_helper_binary (filenameloopback) != GNUNET_SYSERR) |
2808 | { | 2809 | { |
2809 | plugin->server_proc = | 2810 | plugin->server_proc = |
2810 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, | 2811 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, |
2811 | filenameloopback, filenameloopback, "2", NULL); | 2812 | filenameloopback, filenameloopback, "2", |
2812 | } | 2813 | NULL); |
2814 | } | ||
2813 | else | 2815 | else |
2814 | { | 2816 | { |
2815 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, | 2817 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME, |
2816 | "gnunet-transport-wlan-helper-dummy not found, please look if it exists and is in the $PATH variable!\n"); | 2818 | "gnunet-transport-wlan-helper-dummy not found, please look if it exists and is in the $PATH variable!\n"); |
2817 | GNUNET_break(0); | 2819 | GNUNET_break (0); |
2818 | } | 2820 | } |
2819 | } | 2821 | } |
2820 | if (plugin->server_proc == NULL) | 2822 | if (plugin->server_proc == NULL) |
2821 | { | 2823 | { |