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
b4cc5a21
Commit
b4cc5a21
authored
May 13, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
May 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Error handling clean up in local_server_thread.
parent
260e1cb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
rpc.c
dlls/ole32/rpc.c
+7
-19
No files found.
dlls/ole32/rpc.c
View file @
b4cc5a21
...
@@ -1917,16 +1917,12 @@ static DWORD WINAPI local_server_thread(LPVOID param)
...
@@ -1917,16 +1917,12 @@ static DWORD WINAPI local_server_thread(LPVOID param)
DWORD
ret
;
DWORD
ret
;
ret
=
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
INFINITE
);
ret
=
WaitForMultipleObjects
(
2
,
handles
,
FALSE
,
INFINITE
);
if
(
ret
!=
WAIT_OBJECT_0
)
if
(
ret
!=
WAIT_OBJECT_0
)
{
CloseHandle
(
hPipe
);
break
;
break
;
}
}
}
/* client already connected isn't an error */
/* client already connected isn't an error */
else
if
(
error
!=
ERROR_PIPE_CONNECTED
)
else
if
(
error
!=
ERROR_PIPE_CONNECTED
)
{
{
ERR
(
"ConnectNamedPipe failed with error %d
\n
"
,
GetLastError
());
ERR
(
"ConnectNamedPipe failed with error %d
\n
"
,
GetLastError
());
CloseHandle
(
hPipe
);
break
;
break
;
}
}
}
}
...
@@ -1935,20 +1931,14 @@ static DWORD WINAPI local_server_thread(LPVOID param)
...
@@ -1935,20 +1931,14 @@ static DWORD WINAPI local_server_thread(LPVOID param)
hres
=
IStream_Stat
(
pStm
,
&
ststg
,
STATFLAG_NONAME
);
hres
=
IStream_Stat
(
pStm
,
&
ststg
,
STATFLAG_NONAME
);
if
(
hres
)
if
(
hres
)
{
break
;
CloseHandle
(
hPipe
);
CloseHandle
(
pipe_event
);
return
hres
;
}
seekto
.
u
.
LowPart
=
0
;
seekto
.
u
.
LowPart
=
0
;
seekto
.
u
.
HighPart
=
0
;
seekto
.
u
.
HighPart
=
0
;
hres
=
IStream_Seek
(
pStm
,
seekto
,
STREAM_SEEK_SET
,
&
newpos
);
hres
=
IStream_Seek
(
pStm
,
seekto
,
STREAM_SEEK_SET
,
&
newpos
);
if
(
hres
)
{
if
(
hres
)
{
FIXME
(
"IStream_Seek failed, %x
\n
"
,
hres
);
FIXME
(
"IStream_Seek failed, %x
\n
"
,
hres
);
CloseHandle
(
hPipe
);
break
;
CloseHandle
(
pipe_event
);
return
hres
;
}
}
buflen
=
ststg
.
cbSize
.
u
.
LowPart
;
buflen
=
ststg
.
cbSize
.
u
.
LowPart
;
...
@@ -1957,10 +1947,8 @@ static DWORD WINAPI local_server_thread(LPVOID param)
...
@@ -1957,10 +1947,8 @@ static DWORD WINAPI local_server_thread(LPVOID param)
hres
=
IStream_Read
(
pStm
,
buffer
,
buflen
,
&
res
);
hres
=
IStream_Read
(
pStm
,
buffer
,
buflen
,
&
res
);
if
(
hres
)
{
if
(
hres
)
{
FIXME
(
"Stream Read failed, %x
\n
"
,
hres
);
FIXME
(
"Stream Read failed, %x
\n
"
,
hres
);
CloseHandle
(
hPipe
);
CloseHandle
(
pipe_event
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
return
hres
;
break
;
}
}
WriteFile
(
hPipe
,
buffer
,
buflen
,
&
res
,
&
ovl
);
WriteFile
(
hPipe
,
buffer
,
buflen
,
&
res
,
&
ovl
);
...
@@ -1974,22 +1962,22 @@ static DWORD WINAPI local_server_thread(LPVOID param)
...
@@ -1974,22 +1962,22 @@ static DWORD WINAPI local_server_thread(LPVOID param)
if
(
!
multi_use
)
if
(
!
multi_use
)
{
{
TRACE
(
"single use object, shutting down pipe %s
\n
"
,
debugstr_w
(
pipefn
));
TRACE
(
"single use object, shutting down pipe %s
\n
"
,
debugstr_w
(
pipefn
));
CloseHandle
(
hPipe
);
break
;
break
;
}
}
new_pipe
=
CreateNamedPipeW
(
pipefn
,
PIPE_ACCESS_DUPLEX
|
FILE_FLAG_OVERLAPPED
,
new_pipe
=
CreateNamedPipeW
(
pipefn
,
PIPE_ACCESS_DUPLEX
|
FILE_FLAG_OVERLAPPED
,
PIPE_TYPE_BYTE
|
PIPE_WAIT
,
PIPE_UNLIMITED_INSTANCES
,
PIPE_TYPE_BYTE
|
PIPE_WAIT
,
PIPE_UNLIMITED_INSTANCES
,
4096
,
4096
,
500
/* 0.5 second timeout */
,
NULL
);
4096
,
4096
,
500
/* 0.5 second timeout */
,
NULL
);
CloseHandle
(
hPipe
);
if
(
new_pipe
==
INVALID_HANDLE_VALUE
)
if
(
new_pipe
==
INVALID_HANDLE_VALUE
)
{
{
FIXME
(
"pipe creation failed for %s, le is %u
\n
"
,
debugstr_w
(
pipefn
),
GetLastError
());
FIXME
(
"pipe creation failed for %s, le is %u
\n
"
,
debugstr_w
(
pipefn
),
GetLastError
());
CloseHandle
(
pipe_event
);
break
;
return
1
;
}
}
CloseHandle
(
hPipe
);
hPipe
=
new_pipe
;
hPipe
=
new_pipe
;
}
}
CloseHandle
(
pipe_event
);
CloseHandle
(
pipe_event
);
CloseHandle
(
hPipe
);
return
0
;
return
0
;
}
}
...
...
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