]> git.sur5r.net Git - bacula/bacula/commitdiff
Final changes
authorKern Sibbald <kern@sibbald.com>
Mon, 26 Apr 2004 08:59:06 +0000 (08:59 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 26 Apr 2004 08:59:06 +0000 (08:59 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1307 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/console/console.c

index 89c658e551f117cbccc2757d0f79a0234f804440..555e9332cd7aa4ce9c7ea8169d92119be1c378f2 100644 (file)
@@ -380,8 +380,7 @@ Without that I don't how to speak to the Director :-(\n"), configfile);
 
    memset(&jcr, 0, sizeof(jcr));
 
-
-   WSA_Init();                       /* Initialize Windows sockets */
+   (void)WSA_Init();                       /* Initialize Windows sockets */
 
    if (ndir > 1) {
       struct sockaddr_in client_addr;
@@ -397,8 +396,8 @@ try_again:
       }
       UnlockRes();
       if (get_cmd(stdin, _("Select Director: "), UA_sock, 600) < 0) {
-         WSACleanup();               /* Cleanup Windows sockets */
-         return 1;
+        (void)WSACleanup();               /* Cleanup Windows sockets */
+        return 1;
       }
       item = atoi(UA_sock->msg);
       if (item < 0 || item > ndir) {
@@ -469,7 +468,6 @@ try_again:
 /* Cleanup and then exit */
 static void terminate_console(int sig)
 {
-   WSACleanup();               /* Cleanup Windows sockets */
 
    static bool already_here = false;
 
@@ -479,6 +477,7 @@ static void terminate_console(int sig)
    already_here = true;
    free_pool_memory(args);
    con_term();
+   (void)WSACleanup();              /* Cleanup Windows sockets */
    if (sig != 0) {
       exit(1);
    }