fixes
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 22 Dec 2010 15:48:05 +0000 (15:48 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 22 Dec 2010 15:48:05 +0000 (15:48 +0000)
src/transport/Makefile.am
src/transport/gnunet-transport-wlan-helper.c
src/transport/plugin_transport_wlan.c

index 5d766b7a9f2e15ac783679152d00e681c54d8006..1311a08515c3e640834c4ed2b65837e59dd55d2f 100644 (file)
@@ -36,6 +36,7 @@ if HAVE_PCAP
 if LINUX
  WANBIN = gnunet-transport-wlan-helper
  WLAN_PLUGIN_LA = libgnunet_plugin_transport_wlan.la
+ WLAN_API_TEST = test_transport_api_wlan
 endif
 endif
 
@@ -200,6 +201,7 @@ libgnunet_plugin_transport_https_la_CFLAGS = \
  $(CFLAGS) -DBUILD_HTTPS  
 endif
 
+
 check_PROGRAMS = \
  test_transport_api_tcp \
  test_transport_api_tcp_nat \
@@ -209,7 +211,7 @@ check_PROGRAMS = \
  $(HTTP_API_TEST) \
  $(HTTPS_PLUGIN_TEST) \
  $(HTTPS_API_TEST) \
test_transport_api_wlan \
$(WLAN_API_TEST) \
  test_transport_api_multi \
  test_transport_api_reliability_tcp \
  test_transport_api_reliability_tcp_nat \
@@ -331,11 +333,15 @@ test_transport_api_reliability_https_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la
 
+if HAVE_PCAP
+if LINUX
 test_transport_api_wlan_SOURCES = \
  test_transport_api.c
 test_transport_api_wlan_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la  
+endif
+endif
 
 test_quota_compliance_tcp_SOURCES = \
  test_quota_compliance.c
@@ -414,8 +420,6 @@ test_transport_api_multi_SOURCES = \
 test_transport_api_multi_LDADD = \
  $(top_builddir)/src/transport/libgnunettransport.la \
  $(top_builddir)/src/util/libgnunetutil.la  
-
-
 EXTRA_DIST = \
   test_transport_api_data.conf \
   test_transport_api_tcp_peer1.conf \
index 48b628e944df501c033b8756b122e943a469b257..6f8e3d4d1365f8f588e9172be3df500da7a41329 100644 (file)
@@ -595,11 +595,11 @@ testmode(int argc, char *argv[])
 int
 main(int argc, char *argv[])
 {
-       if ((argc==3) && (strstr(argv[2],"1")))
+       if ((argc==2) && (strstr(argv[1],"1")))
        {
                return testmode(argc, argv);
        }
-
+#if 0
        u8 u8aSendBuffer[500];
        char szErrbuf[PCAP_ERRBUF_SIZE];
        int nCaptureHeaderLength = 0, n80211HeaderLength = 0, nLinkEncap = 0;
@@ -697,7 +697,7 @@ main(int argc, char *argv[])
 
        //get header type
        nLinkEncap = pcap_datalink(ppcap);
-       nCaptureHeaderLength = 0;
+       nCaptureHeaderLength = 0;home/mwachs/gnb/bin/
 
        switch (nLinkEncap) {
 
@@ -857,7 +857,7 @@ main(int argc, char *argv[])
        }
 
 
-
+#endif
        return (0);
 }
 
index d3c7d21508cc1c46db26a3bebc7ab0fa5d83232f..aaa11b80a5c57007858fd063c923e42fdcc7536b 100644 (file)
@@ -49,7 +49,7 @@
 
 #define FRAGMENT_QUEUE_SIZE 10
 
-#define DEBUG_wlan GNUNET_NO
+#define DEBUG_wlan GNUNET_YES
 
 #define MESSAGE_LENGHT_UNKNOWN -1
 #define NO_MESSAGE_OR_MESSAGE_FINISHED -2
@@ -1994,7 +1994,7 @@ wlan_plugin_helper_read (void *cls,
 static int
 wlan_transport_start_wlan_helper(struct Plugin *plugin, int testmode)
 {
-
+  char * filename = "gnunet-transport-wlan-helper";
   plugin->server_stdout = GNUNET_DISK_pipe(GNUNET_YES, GNUNET_NO, GNUNET_YES);
   if (plugin->server_stdout == NULL)
     return GNUNET_SYSERR;
@@ -2005,12 +2005,12 @@ wlan_transport_start_wlan_helper(struct Plugin *plugin, int testmode)
 
 #if DEBUG_wlan
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-      "Starting gnunet-wlan-helper process cmd: %s %s\n", "gnunet-wlan-helper", plugin->interface);
+      "Starting gnunet-wlan-helper process cmd: %s %s %i\n", filename, plugin->interface, testmode);
 #endif
   /* Start the server process */
+
   plugin->server_proc = GNUNET_OS_start_process(plugin->server_stdin,
-      plugin->server_stdout, "gnunet-transport-wlan-helper",
-      plugin->interface, testmode, NULL);
+                 plugin->server_stdout, filename, plugin->interface, ((testmode==1)?"1":"0"), NULL);
   if (plugin->server_proc == NULL)
     {
 #if DEBUG_wlan
@@ -2077,7 +2077,6 @@ libgnunet_plugin_transport_wlan_init (void *cls)
 
   GNUNET_assert(cls !=NULL);
 
-  fprintf(stderr,"HERE");
   plugin = GNUNET_malloc (sizeof (struct Plugin));
   plugin->env = env;
   plugin->pendingsessions = 0;