[ros-diffs] [winesync] 32853: Autosyncing with Wine HEAD

winesync at svn.reactos.org winesync at svn.reactos.org
Fri Apr 4 15:51:01 CEST 2008


Author: winesync
Date: Fri Apr  4 08:51:01 2008
New Revision: 32853

URL: http://svn.reactos.org/svn/reactos?rev=32853&view=rev
Log:
Autosyncing with Wine HEAD

Modified:
    trunk/reactos/dll/win32/netapi32/nbt.c
    trunk/reactos/dll/win32/netapi32/netapi32.rbuild
    trunk/reactos/dll/win32/netapi32/wksta.c

Modified: trunk/reactos/dll/win32/netapi32/nbt.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/nbt.c?rev=32853&r1=32852&r2=32853&view=diff
==============================================================================
--- trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/nbt.c [iso-8859-1] Fri Apr  4 08:51:01 2008
@@ -1278,13 +1278,13 @@
 {
     UCHAR ret;
     NetBTAdapter *adapter;
-    
+
     if (!ipRow) return NRC_BADDR;
 
     adapter = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(NetBTAdapter));
     if (adapter)
     {
-        memcpy(&adapter->ipr, ipRow, sizeof(MIB_IPADDRROW));
+        adapter->ipr = *ipRow;
         if (!NetBIOSRegisterAdapter(gTransportID, ipRow->dwIndex, adapter))
         {
             NetBTCleanupAdapter(adapter);

Modified: trunk/reactos/dll/win32/netapi32/netapi32.rbuild
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi32.rbuild?rev=32853&r1=32852&r2=32853&view=diff
==============================================================================
--- trunk/reactos/dll/win32/netapi32/netapi32.rbuild [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/netapi32.rbuild [iso-8859-1] Fri Apr  4 08:51:01 2008
@@ -8,12 +8,6 @@
 	<define name="__WINESRC__" />
 	<define name="WINVER">0x600</define>
 	<define name="_WIN32_WINNT">0x600</define>
-	<library>wine</library>
-	<library>iphlpapi</library>
-	<library>ws2_32</library>
-	<library>advapi32</library>
-	<library>kernel32</library>
-	<library>ntdll</library>
 	<file>access.c</file>
 	<file>apibuf.c</file>
 	<file>browsr.c</file>
@@ -27,5 +21,11 @@
 	<file>share.c</file>
 	<file>wksta.c</file>
 	<file>netapi32.spec</file>
+	<library>wine</library>
+	<library>iphlpapi</library>
+	<library>ws2_32</library>
+	<library>advapi32</library>
+	<library>kernel32</library>
+	<library>ntdll</library>
 </module>
 </group>

Modified: trunk/reactos/dll/win32/netapi32/wksta.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta.c?rev=32853&r1=32852&r2=32853&view=diff
==============================================================================
--- trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netapi32/wksta.c [iso-8859-1] Fri Apr  4 08:51:01 2008
@@ -308,6 +308,8 @@
 NET_API_STATUS WINAPI NetWkstaUserGetInfo(LMSTR reserved, DWORD level,
                                           PBYTE* bufptr)
 {
+    NET_API_STATUS nastatus;
+
     TRACE("(%s, %d, %p)\n", debugstr_w(reserved), level, bufptr);
     switch (level)
     {
@@ -317,8 +319,10 @@
         DWORD dwSize = UNLEN + 1;
 
         /* set up buffer */
-        NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_0) + dwSize * sizeof(WCHAR),
+        nastatus = NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_0) + dwSize * sizeof(WCHAR),
                              (LPVOID *) bufptr);
+        if (nastatus != NERR_Success)
+            return ERROR_NOT_ENOUGH_MEMORY;
 
         ui = (PWKSTA_USER_INFO_0) *bufptr;
         ui->wkui0_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_0));
@@ -329,11 +333,14 @@
             NetApiBufferFree(ui);
             return ERROR_NOT_ENOUGH_MEMORY;
         }
-        else
-            NetApiBufferReallocate(
+        else {
+            nastatus = NetApiBufferReallocate(
                 *bufptr, sizeof(WKSTA_USER_INFO_0) +
                 (lstrlenW(ui->wkui0_username) + 1) * sizeof(WCHAR),
                 (LPVOID *) bufptr);
+            if (nastatus != NERR_Success)
+                return nastatus;
+        }
         break;
     }
 
@@ -356,7 +363,9 @@
 
         /* get some information first to estimate size of the buffer */
         ui0 = NULL;
-        NetWkstaUserGetInfo(NULL, 0, (PBYTE *) &ui0);
+        nastatus = NetWkstaUserGetInfo(NULL, 0, (PBYTE *) &ui0);
+        if (nastatus != NERR_Success)
+            return nastatus;
         username_sz = lstrlenW(ui0->wkui0_username) + 1;
 
         ZeroMemory(&ObjectAttributes, sizeof(ObjectAttributes));
@@ -376,10 +385,14 @@
         LsaClose(PolicyHandle);
 
         /* set up buffer */
-        NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_1) +
+        nastatus = NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_1) +
                              (username_sz + logon_domain_sz +
                               oth_domains_sz + logon_server_sz) * sizeof(WCHAR),
                              (LPVOID *) bufptr);
+        if (nastatus != NERR_Success) {
+            NetApiBufferFree(ui0);
+            return nastatus;
+        }
         ui = (WKSTA_USER_INFO_1 *) *bufptr;
         ui->wkui1_username = (LMSTR) (*bufptr + sizeof(WKSTA_USER_INFO_1));
         ui->wkui1_logon_domain = (LMSTR) (
@@ -414,9 +427,10 @@
         /* FIXME see also wkui1_oth_domains for level 1 */
 
         /* set up buffer */
-        NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_1101) + dwSize * sizeof(WCHAR),
+        nastatus = NetApiBufferAllocate(sizeof(WKSTA_USER_INFO_1101) + dwSize * sizeof(WCHAR),
                              (LPVOID *) bufptr);
-
+        if (nastatus != NERR_Success)
+            return nastatus;
         ui = (PWKSTA_USER_INFO_1101) *bufptr;
         ui->wkui1101_oth_domains = (LMSTR)(ui + 1);
 
@@ -442,10 +456,9 @@
     NetApiBufferAllocate(dwSize * sizeof(WCHAR), (LPVOID *) Buffer);
     if (GetComputerNameW(*Buffer,  &dwSize))
     {
-        NetApiBufferReallocate(
+        return NetApiBufferReallocate(
             *Buffer, (dwSize + 1) * sizeof(WCHAR),
             (LPVOID *) Buffer);
-        return NERR_Success;
     }
     else
     {



More information about the Ros-diffs mailing list