Capabilities are unsigned on Windows too
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Mon, 13 Jul 2009 23:18:25 +0000 (00:18 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Tue, 14 Jul 2009 01:39:28 +0000 (19:39 -0600)
Capabilities are defined in the .xg file as being an array of
unsigned integers. Implement them as such on Windows, too.

This is a Windows version of the fix in
7191005e4df1eaaf4ec94c8199ffeb72be785794

Reviewed-on: http://gerrit.openafs.org/76
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/WINNT/afsd/cm_callback.c

index 17ab444..81a6e5e 100644 (file)
@@ -1200,7 +1200,7 @@ SRXAFSCB_TellMeAboutYourself( struct rx_call *callp,
                               Capabilities * capabilities)
 {
     int i;
-    afs_int32 *dataBuffP;
+    afs_uint32 *dataBuffP;
     afs_int32 dataBytes;
     long code;
     struct rx_connection *connp;
@@ -1245,10 +1245,10 @@ SRXAFSCB_TellMeAboutYourself( struct rx_call *callp,
     }
     lock_ReleaseRead(&cm_syscfgLock);
 
-    dataBytes = 1 * sizeof(afs_int32);
-    dataBuffP = (afs_int32 *) osi_Alloc(dataBytes);
+    dataBytes = 1 * sizeof(afs_uint32);
+    dataBuffP = (afs_uint32 *) osi_Alloc(dataBytes);
     dataBuffP[0] = CLIENT_CAPABILITY_ERRORTRANS;
-    capabilities->Capabilities_len = dataBytes / sizeof(afs_int32);
+    capabilities->Capabilities_len = dataBytes / sizeof(afs_uint32);
     capabilities->Capabilities_val = dataBuffP;
 
     return 0;