diff options
author | David Brodski <david@brodski.eu> | 2011-09-14 08:33:24 +0000 |
---|---|---|
committer | David Brodski <david@brodski.eu> | 2011-09-14 08:33:24 +0000 |
commit | 35faa8a5e9cecd23e084d715df252ca2cd550fe7 (patch) | |
tree | ee83059dd187a88831b31a356c683e18502f0b5b /src/transport/plugin_transport_wlan.c | |
parent | 1834f5d8d620f05ca1e737b25d66379c767294a9 (diff) | |
download | gnunet-35faa8a5e9cecd23e084d715df252ca2cd550fe7.tar.gz gnunet-35faa8a5e9cecd23e084d715df252ca2cd550fe7.zip |
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r-- | src/transport/plugin_transport_wlan.c | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c index fa638ac0f..dd21d5eff 100644 --- a/src/transport/plugin_transport_wlan.c +++ b/src/transport/plugin_transport_wlan.c | |||
@@ -2754,10 +2754,26 @@ 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 | plugin->server_proc = | 2757 | if (GNUNET_OS_check_helper_binary(filenameloopback) == GNUNET_YES) |
2758 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, | 2758 | { |
2759 | filenamehw, filenamehw, plugin->interface, | 2759 | plugin->server_proc = |
2760 | NULL); | 2760 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, |
2761 | filenamehw, filenamehw, plugin->interface, | ||
2762 | NULL); | ||
2763 | } | ||
2764 | else if (GNUNET_OS_check_helper_binary(filenameloopback) == GNUNET_NO) | ||
2765 | { | ||
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"); | ||
2768 | GNUNET_break(0); | ||
2769 | } | ||
2770 | else | ||
2771 | { | ||
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"); | ||
2774 | GNUNET_break(0); | ||
2775 | } | ||
2776 | |||
2761 | } | 2777 | } |
2762 | else if (testmode == 1) | 2778 | else if (testmode == 1) |
2763 | { | 2779 | { |
@@ -2768,9 +2784,18 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin, int testmode) | |||
2768 | filenameloopback, plugin->interface, testmode); | 2784 | filenameloopback, plugin->interface, testmode); |
2769 | #endif | 2785 | #endif |
2770 | 2786 | ||
2771 | plugin->server_proc = | 2787 | if (GNUNET_OS_check_helper_binary(filenameloopback) != GNUNET_SYSERR) |
2788 | { | ||
2789 | plugin->server_proc = | ||
2772 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, | 2790 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, |
2773 | filenameloopback, filenameloopback, "1", NULL); | 2791 | filenameloopback, filenameloopback, "1", NULL); |
2792 | } | ||
2793 | else | ||
2794 | { | ||
2795 | 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_break(0); | ||
2798 | } | ||
2774 | } | 2799 | } |
2775 | else if (testmode == 2) | 2800 | else if (testmode == 2) |
2776 | { | 2801 | { |
@@ -2779,9 +2804,18 @@ wlan_transport_start_wlan_helper (struct Plugin *plugin, int testmode) | |||
2779 | "Starting gnunet-wlan-helper loopback 2 process cmd: %s %s %i\n", | 2804 | "Starting gnunet-wlan-helper loopback 2 process cmd: %s %s %i\n", |
2780 | filenameloopback, plugin->interface, testmode); | 2805 | filenameloopback, plugin->interface, testmode); |
2781 | #endif | 2806 | #endif |
2782 | plugin->server_proc = | 2807 | if (GNUNET_OS_check_helper_binary(filenameloopback) != GNUNET_SYSERR) |
2808 | { | ||
2809 | plugin->server_proc = | ||
2783 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, | 2810 | GNUNET_OS_start_process (plugin->server_stdin, plugin->server_stdout, |
2784 | filenameloopback, filenameloopback, "2", NULL); | 2811 | filenameloopback, filenameloopback, "2", NULL); |
2812 | } | ||
2813 | else | ||
2814 | { | ||
2815 | 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"); | ||
2817 | GNUNET_break(0); | ||
2818 | } | ||
2785 | } | 2819 | } |
2786 | if (plugin->server_proc == NULL) | 2820 | if (plugin->server_proc == NULL) |
2787 | { | 2821 | { |