[hipl-commit] [trunk] Rev 4303: Remove disabled code from the test subdirectory.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 16 Apr 2010 01:49:46 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 16/04/2010 at 01:49:46
Revision: 4303
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove disabled code from the test subdirectory.

Modified:
  M  test/conntest-client-hip.c
  M  test/conntest.c
  M  test/cookietest.c
  M  test/dh_performance.c

=== modified file 'test/conntest-client-hip.c'
--- test/conntest-client-hip.c  2010-04-13 09:52:59 +0000
+++ test/conntest-client-hip.c  2010-04-15 22:49:30 +0000
@@ -79,17 +79,6 @@
 
     port = atoi(argv[3]);
 
-    /* Disabled since this comparison is always true with the current
-     * port number boundaries. */
-#if 0
-    if (port < MINPORTNUM || port > MAXPORTNUM) {
-        HIP_INFO("Invalid port number, allowed port numbers are "
-                 "from %d to %d.\n%s\n", MINPORTNUM, MAXPORTNUM,
-                 usage);
-        return EXIT_FAILURE;
-     }
-#endif
-
     HIP_INFO("=== Testing %s connection to '%s' on port %s ===\n",
              (socktype == SOCK_STREAM ? "TCP" : "UDP"), argv[1],
              argv[3]);

=== modified file 'test/conntest.c'
--- test/conntest.c     2010-04-13 15:47:28 +0000
+++ test/conntest.c     2010-04-15 22:49:30 +0000
@@ -372,8 +372,6 @@
         }
         printf("Received %d bytes\n", recvnum);
 
-        //is_ipv4 = IN6_IS_ADDR_V4MAPPED(&peer_addr.in6.sin6_addr);
-
         cmsg_level = (is_ipv4) ? IPPROTO_IP : IPPROTO_IPV6;
         cmsg_type  = (is_ipv4) ? IP_PKTINFO : IPV6_2292PKTINFO;
 
@@ -394,7 +392,6 @@
         if (is_ipv4) {
             local_addr.in4.sin_family      = AF_INET;
             local_addr.in4.sin_port        = htons(local_port);
-            //local_addr.in4.sin_port = peer_addr.in6.sin6_port;
             local_addr.in4.sin_addr.s_addr =
                 pktinfo.in4->ipi_addr.s_addr;
             HIP_DEBUG_INADDR("local addr",

=== modified file 'test/cookietest.c'
--- test/cookietest.c   2010-04-13 15:47:28 +0000
+++ test/cookietest.c   2010-04-15 22:49:30 +0000
@@ -18,7 +18,6 @@
     puzzle->lifetime  = 0;
     puzzle->opaque[0] = opaque & 0xFF;
     puzzle->opaque[1] = (opaque & 0xFF00) >> 8;
-    /* puzzle.opaque[2] = (opaque & 0xFF0000) >> 16; */
     puzzle->I         = random_i;
 }
 

=== modified file 'test/dh_performance.c'
--- test/dh_performance.c       2010-04-13 15:47:28 +0000
+++ test/dh_performance.c       2010-04-15 22:49:30 +0000
@@ -413,7 +413,6 @@
         dhp_start_benchmark(&bench_time);
         /* create new DH keys */
         for (i = 0; i < sw_create_rsa; i++) {
-            //printf("Create key %d\n", i);
             if (sw_file_output) {
                 hip_perf_start_benchmark(perf_set, PS_RSA_CREATE);
             }
@@ -745,8 +744,6 @@
     printf("%4.2f hash chains per sec, %4.2f hash chains per min\n",
            sw_bench_loops / bench_secs, sw_bench_loops / bench_secs * 60 * 
1000);
 
-    //if(sw_file_output) hip_perf_close(perf_set);
-
 #endif
 
     printf( "-------------------------------\n"

Other related posts:

  • » [hipl-commit] [trunk] Rev 4303: Remove disabled code from the test subdirectory. - Diego Biurrun