mirror of
https://github.com/reactos/reactos.git
synced 2024-08-16 16:39:08 +00:00
sync netapi32 with wine 1.1.14
svn path=/trunk/; revision=39260
This commit is contained in:
parent
697550c010
commit
4ef810bd41
|
@ -103,10 +103,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(netbios);
|
||||||
#define MIN_CACHE_TIMEOUT 60000
|
#define MIN_CACHE_TIMEOUT 60000
|
||||||
#define CACHE_TIMEOUT 360000
|
#define CACHE_TIMEOUT 360000
|
||||||
|
|
||||||
#define MAX_NBT_NAME_SZ (NCBNAMSZ * 2 + MAX_DOMAIN_NAME_LEN + 2)
|
#define MAX_NBT_NAME_SZ 255
|
||||||
#define SIMPLE_NAME_QUERY_PKT_SIZE 26 + MAX_NBT_NAME_SZ
|
#define SIMPLE_NAME_QUERY_PKT_SIZE 16 + MAX_NBT_NAME_SZ
|
||||||
|
|
||||||
#define DEFAULT_NBT_SESSIONS 16
|
|
||||||
|
|
||||||
#define NBNS_TYPE_NB 0x0020
|
#define NBNS_TYPE_NB 0x0020
|
||||||
#define NBNS_TYPE_NBSTAT 0x0021
|
#define NBNS_TYPE_NBSTAT 0x0021
|
||||||
|
@ -156,7 +154,7 @@ static DWORD gWINSQueries;
|
||||||
static DWORD gWINSQueryTimeout;
|
static DWORD gWINSQueryTimeout;
|
||||||
static DWORD gWINSServers[MAX_WINS_SERVERS];
|
static DWORD gWINSServers[MAX_WINS_SERVERS];
|
||||||
static int gNumWINSServers;
|
static int gNumWINSServers;
|
||||||
static char gScopeID[MAX_DOMAIN_NAME_LEN];
|
static char gScopeID[MAX_SCOPE_ID_LEN];
|
||||||
static DWORD gCacheTimeout;
|
static DWORD gCacheTimeout;
|
||||||
static struct NBNameCache *gNameCache;
|
static struct NBNameCache *gNameCache;
|
||||||
|
|
||||||
|
@ -1493,7 +1491,7 @@ void NetBTInit(void)
|
||||||
(LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT
|
(LPBYTE)&dword, &size) == ERROR_SUCCESS && dword >= MIN_QUERY_TIMEOUT
|
||||||
&& dword <= MAX_QUERY_TIMEOUT)
|
&& dword <= MAX_QUERY_TIMEOUT)
|
||||||
gWINSQueryTimeout = dword;
|
gWINSQueryTimeout = dword;
|
||||||
size = MAX_DOMAIN_NAME_LEN - 1;
|
size = sizeof(gScopeID) - 1;
|
||||||
if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, (LPBYTE)gScopeID + 1, &size)
|
if (RegQueryValueExW(hKey, ScopeIDW, NULL, NULL, (LPBYTE)gScopeID + 1, &size)
|
||||||
== ERROR_SUCCESS)
|
== ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
|
@ -1501,11 +1499,11 @@ void NetBTInit(void)
|
||||||
NetBTNameEncode */
|
NetBTNameEncode */
|
||||||
char *ptr, *lenPtr;
|
char *ptr, *lenPtr;
|
||||||
|
|
||||||
for (ptr = gScopeID + 1; *ptr &&
|
for (ptr = gScopeID + 1; ptr - gScopeID < sizeof(gScopeID) && *ptr; )
|
||||||
ptr - gScopeID < MAX_DOMAIN_NAME_LEN; )
|
|
||||||
{
|
{
|
||||||
for (lenPtr = ptr - 1, *lenPtr = 0; *ptr && *ptr != '.' &&
|
for (lenPtr = ptr - 1, *lenPtr = 0;
|
||||||
ptr - gScopeID < MAX_DOMAIN_NAME_LEN; ptr++)
|
ptr - gScopeID < sizeof(gScopeID) && *ptr && *ptr != '.';
|
||||||
|
ptr++)
|
||||||
*lenPtr += 1;
|
*lenPtr += 1;
|
||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue