From d7690835aca12b3d38722a8dafa6efbfb1f549ee Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 7 Jun 2012 09:23:26 -0400 Subject: [PATCH] Windows: misplaced brace in KFW_AFS_get_cred A misplaced brace in KFW_AFS_get_cred() results in KFW_AFS_klog() being executed twice in a row if successful. The second attempt could fail due to a KRB5KRB_AP_ERR_REPEAT error issued by the KDC. Change-Id: I6364c1e378eeeeec9f66449674c8cd240f029a8a Reviewed-on: http://gerrit.openafs.org/7626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/afskfw.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/WINNT/afsd/afskfw.c b/src/WINNT/afsd/afskfw.c index 1a93711898..ea0596650d 100644 --- a/src/WINNT/afsd/afskfw.c +++ b/src/WINNT/afsd/afskfw.c @@ -1210,15 +1210,15 @@ KFW_AFS_get_cred( char * username, if ( code ) goto cleanup; KFW_AFS_update_princ_ccache_data(context, cc, FALSE); - } - code = KFW_AFS_klog(context, cc, "afs", cell, realm, lifetime, smbname); - if ( IsDebuggerPresent() ) { - char message[256]; - StringCbPrintf(message, sizeof(message), "KFW_AFS_klog() returns: %d\n", code); - OutputDebugString(message); + code = KFW_AFS_klog(context, cc, "afs", cell, realm, lifetime, smbname); + if ( IsDebuggerPresent() ) { + char message[256]; + StringCbPrintf(message, sizeof(message), "KFW_AFS_klog() returns: %d\n", code); + OutputDebugString(message); + } + if ( code ) goto cleanup; } - if ( code ) goto cleanup; KFW_AFS_update_cell_princ_map(context, cell, pname, TRUE);