commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r812014 - in /commons/sandbox/runtime/trunk/src/main/native: os/win32/sema.c os/win32/wutil.c shared/md5.c
Date Mon, 07 Sep 2009 07:02:12 GMT
Author: mturk
Date: Mon Sep  7 07:02:12 2009
New Revision: 812014

URL: http://svn.apache.org/viewvc?rev=812014&view=rev
Log:
Fix resource names format

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/win32/sema.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
    commons/sandbox/runtime/trunk/src/main/native/shared/md5.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/sema.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/sema.c?rev=812014&r1=812013&r2=812014&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/sema.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/sema.c Mon Sep  7 07:02:12 2009
@@ -87,6 +87,8 @@
         ACR_THROW_IO_ERRNO();
         return -1;
     }
+    printf("\nCreateMutex %S\n", reskey);
+    
     rc = acr_ioh_open(s, ACR_DT_SEMAPHORE, 0, semaphore_cleanup);
     return rc;
 }

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=812014&r1=812013&r2=812014&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Mon Sep  7 07:02:12 2009
@@ -42,7 +42,7 @@
 #else
     swprintf(rname,
 #endif
-            L"Global\\a%02x:", (type & 0xFF));
+            L"Global\\ac%02x-", (type & 0xFF));
     if (fname == NULL) {
         /* Use upper 24 bits for object name.
          */
@@ -51,7 +51,7 @@
 #else
         swprintf(pname,
 #endif
-                L"%08x:", (type >> 8));
+                L"%08x", (type >> 8));
         rc = 1;
     }
     else if (*fname == L'\\' || *fname == '/' ||
@@ -62,9 +62,9 @@
         rc = GetFullPathNameW(fname, ACR_SBUFF_LEN, pname, NULL);
     }
     if (rc == 0 || rc > ACR_SBUFF_LEN)
-        ACR_MD5EncUuidW(fname, wcslen(fname), rname + 11);
+        ACR_MD5EncUuidW(fname, wcslen(fname), rname + 12);
     else
-        ACR_MD5EncUuidW(pname, wcslen(pname), rname + 11);
+        ACR_MD5EncUuidW(pname, wcslen(pname), rname + 12);
     return rname;
 }
 
@@ -83,7 +83,7 @@
 #else
     swprintf(rname,
 #endif
-            L"Global\\res:%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+            L"Global\\uuid-%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
             d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7],
             d[8], d[9], d[10], d[11], d[12], d[13], d[14], d[15]);
 

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/md5.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/md5.c?rev=812014&r1=812013&r2=812014&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/md5.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/md5.c Mon Sep  7 07:02:12 2009
@@ -342,7 +342,7 @@
     ACR_MD5UpdateA(&context, clear, len);
     ACR_MD5Final(digest, &context);
     for (i = 0; i < ACR_MD5_DIGEST_LENGTH; i++) {
-        if (x == 4 || x == 7 || x == 10 || x == 13)
+        if (i == 4 || i == 6 || i == 8 || i == 10)
             out[x++] = '-';
         out[x++] = HI_NIBBLE_HEX(digest[i]);
         out[x++] = LO_NIBBLE_HEX(digest[i]);
@@ -366,7 +366,7 @@
     ACR_MD5UpdateW(&context, clear, len);
     ACR_MD5Final(digest, &context);
     for (i = 0; i < ACR_MD5_DIGEST_LENGTH; i++) {
-        if (x == 4 || x == 7 || x == 10 || x == 13)
+        if (i == 4 || i == 6 || i == 8 || i == 10)
             out[x++] = L'-';
         out[x++] = HI_NIBBLE_HEX(digest[i]);
         out[x++] = LO_NIBBLE_HEX(digest[i]);



Mime
View raw message