Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
e1413fae
Commit
e1413fae
authored
Mar 13, 2009
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Mar 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Return 0 for the local computer.
parent
79859cb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
provider.c
dlls/localspl/provider.c
+8
-7
No files found.
dlls/localspl/provider.c
View file @
e1413fae
...
...
@@ -251,25 +251,26 @@ static LONG copy_servername_from_name(LPCWSTR name, LPWSTR target)
ptr
=
strchrW
(
server
,
'\\'
);
serverlen
=
(
ptr
)
?
ptr
-
server
:
lstrlenW
(
server
);
/* servername is empty
or to long
*/
/* servername is empty */
if
(
serverlen
==
0
)
return
0
;
TRACE
(
"found %s
\n
"
,
debugstr_wn
(
server
,
serverlen
));
if
(
serverlen
>
MAX_COMPUTERNAME_LENGTH
)
return
-
serverlen
;
if
(
target
)
{
memcpy
(
target
,
server
,
serverlen
*
sizeof
(
WCHAR
));
target
[
serverlen
]
=
'\0'
;
}
len
=
sizeof
(
buffer
)
/
sizeof
(
buffer
[
0
]);
if
(
GetComputerNameW
(
buffer
,
&
len
))
{
if
((
serverlen
==
len
)
&&
(
strncmpiW
(
server
,
buffer
,
len
)
==
0
))
{
/* The requested Servername is our computername */
if
(
target
)
{
memcpy
(
target
,
server
,
serverlen
*
sizeof
(
WCHAR
));
target
[
serverlen
]
=
'\0'
;
}
return
serverlen
;
return
0
;
}
}
return
0
;
return
serverlen
;
}
/******************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment