]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
small updates in mini-handshake-timeout
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 11 Aug 2012 12:57:01 +0000 (14:57 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 11 Aug 2012 13:12:12 +0000 (15:12 +0200)
tests/mini-handshake-timeout.c

index 6261841313193aa15947664b32c5a0afbb847928..dc868618f46cef96f9aacb76298b60a7e17dbfc6 100644 (file)
@@ -119,20 +119,23 @@ client (int fd, int wait)
     {
       if (ret != GNUTLS_E_TIMEDOUT || wait == 0) 
         {
-          if (debug) success("client: unexpected error: %s\n", gnutls_strerror(ret));
+          if (debug) fail("client: unexpected error: %s\n", gnutls_strerror(ret));
           exit(1);
         }
       if (debug) success("client: expected timeout occured\n");
-      gnutls_perror (ret);
       exit(0);
     }
   else
     {
-      if (wait != 0) fail ("client: handshake was completed unexpectedly\n");
-      gnutls_perror (ret);
+      if (wait != 0) 
+        {
+          fail ("client: handshake was completed unexpectedly\n");
+          gnutls_perror (ret);
+          exit(1);
+        }
     }
 
-  exit(1);
+  exit(0);
 }
 
 
@@ -224,7 +227,6 @@ static void start (int wait)
       close(fd[1]);
       server (fd[0], wait);
       close(fd[0]);
-      kill(child, SIGTERM);
     }
   else 
     {