]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Windows: log error code for smb lan thread fail
authorJeffrey Altman <jaltman@your-file-system.com>
Sun, 12 Dec 2010 04:28:02 +0000 (23:28 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 1 Feb 2011 04:13:46 +0000 (20:13 -0800)
When creation of the smb_LanAdapterChangeThread fails
log the error code as part of the panic message.

Reviewed-on: http://gerrit.openafs.org/3502
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit f8400699a881eb4f675cba1fbcd7f7ac6eecd355)

Change-Id: Ibeb735922101dd89c998746f06f9c56354533506
Reviewed-on: http://gerrit.openafs.org/3801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/WINNT/afsd/smb.c

index cb16e156a81a73b010f6f3b2423353754a0c1afd..5acc16b3c1f17edfb4839fb2ed12ad2e695923ad 100644 (file)
@@ -10292,7 +10292,16 @@ void smb_SetLanAdapterChangeDetected(void)
     if (!powerStateSuspended) {
         phandle = thrd_Create(NULL, 65536, (ThreadFunc) smb_LanAdapterChangeThread,
                               NULL, 0, &lpid, "smb_LanAdapterChange");
-        osi_assertx(phandle != NULL, "smb_LanAdapterChangeThread thread creation failure");
+        if (phandle == NULL) {
+            DWORD gle;
+            char msg[128];
+
+            gle = GetLastError();
+            StringCchPrintf( msg, sizeof(msg)/sizeof(msg[0]),
+                             "smb_LanAdapterChangeThread thread creation failure - gle 0x%x",
+                             gle);
+            osi_assertx(TRUE, msg);
+        }
         thrd_CloseHandle(phandle);
     }