LRN: 0009-Fix-.exe-extension-in-topology-string.patch
authorChristian Grothoff <christian@grothoff.org>
Fri, 5 Aug 2011 21:16:46 +0000 (21:16 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 5 Aug 2011 21:16:46 +0000 (21:16 +0000)
src/testing/test_testing_topology.c

index fd6e1847ed7bbfa9028e437e24c7ada77477feef..426e9a2239128836a954ea66cccedffcf82c9c03 100644 (file)
@@ -1250,6 +1250,9 @@ main (int argc, char *argv[])
   topology_string = strstr (topology_string, "_");
   GNUNET_assert (topology_string != NULL);
   topology_string++;
+  topology_string = GNUNET_strdup (topology_string);
+  if (strstr (topology_string, ".exe"))
+    topology_string[strstr (topology_string, ".exe") - topology_string] = 0;
 
   GNUNET_asprintf (&our_binary_name, "test-testing-topology_%s",
                    topology_string);
@@ -1263,6 +1266,7 @@ main (int argc, char *argv[])
 #endif
                     NULL);
   ret = check ();
+  GNUNET_free (topology_string);
 
   /**
    * Need to remove base directory, subdirectories taken care