gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r1604 - in GNUnet/src: conf util/win


From: durner
Subject: [GNUnet-SVN] r1604 - in GNUnet/src: conf util/win
Date: Thu, 4 Aug 2005 12:41:36 -0700 (PDT)

Author: durner
Date: 2005-08-04 12:41:32 -0700 (Thu, 04 Aug 2005)
New Revision: 1604

Modified:
   GNUnet/src/conf/wizard_util.c
   GNUnet/src/util/win/win.cc
Log:
Don't complain if the service wasn't installed before

Modified: GNUnet/src/conf/wizard_util.c
===================================================================
--- GNUnet/src/conf/wizard_util.c       2005-08-04 18:51:57 UTC (rev 1603)
+++ GNUnet/src/conf/wizard_util.c       2005-08-04 19:41:32 UTC (rev 1604)
@@ -107,9 +107,11 @@
     case 5:
       err = winErrorStr(_("Can't access the service"),
                        GetLastError());
+         break;
     case 6:
       err = winErrorStr(_("Can't delete the service"),
                        GetLastError());
+      break;
     default:
       err = winErrorStr(_("Unknown error"), GetLastError());
     }  

Modified: GNUnet/src/util/win/win.cc
===================================================================
--- GNUnet/src/util/win/win.cc  2005-08-04 18:51:57 UTC (rev 1603)
+++ GNUnet/src/util/win/win.cc  2005-08-04 19:41:32 UTC (rev 1604)
@@ -247,7 +247,6 @@
 {
   SC_HANDLE hManager, hService;
   
-
   if (! GNOpenSCManager)
     return 1;
 
@@ -256,14 +255,16 @@
     return 2;
 
   if (! (hService = GNOpenService(hManager, "GNUnet", DELETE)))
-    return 3;
+       if (GetLastError() != ERROR_SERVICE_DOES_NOT_EXIST)
+       return 3;
+       else
+               goto closeSCM;
 
   if (! GNDeleteService(hService))
-  {
        if (GetLastError() != ERROR_SERVICE_MARKED_FOR_DELETE)
        return 4;
-  }
 
+closeSCM:
   GNCloseServiceHandle(hService);
 
        return 0;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]