]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afsdb-resolver-reinit-20061230
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 30 Dec 2006 16:55:02 +0000 (16:55 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 30 Dec 2006 16:55:02 +0000 (16:55 +0000)
FIXES 50576

replace 'try' with 'try_init' and declare 'try_init'.
'try' is a reserved word on some compilers.  not sure how this code
was compiling on MacOS X and Windows as 'try' was not declared.

src/auth/cellconfig.c

index 63bd91e2bd2d98f6a4b1055cf776162de0b3fc25..c8635cec5796fd4d9c795596ad8e0afcac004a39 100644 (file)
@@ -855,6 +855,7 @@ afsconf_GetAfsdbInfo(char *acellName, char *aservice,
     char host[256];
     int server_num = 0;
     int minttl = 0;
+    int try_init = 0;
 
     /* The resolver isn't always MT-safe.. Perhaps this ought to be
      * replaced with a more fine-grained lock just for the resolver
@@ -881,8 +882,8 @@ afsconf_GetAfsdbInfo(char *acellName, char *aservice,
        UNLOCK_GLOBAL_MUTEX;
     }
     if (len < 0) {
-       if (try < 1) {
-           try++;
+       if (try_init < 1) {
+           try_init++;
            res_init();
            goto retryafsdb;
        }