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
559fafeb
Commit
559fafeb
authored
Apr 11, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Apr 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Split RPC_MainLoop into initialisation and the actual loop.
parent
9a2914b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
6 deletions
+16
-6
rpc.c
programs/services/rpc.c
+13
-5
services.c
programs/services/services.c
+2
-1
services.h
programs/services/services.h
+1
-0
No files found.
programs/services/rpc.c
View file @
559fafeb
...
...
@@ -1333,11 +1333,10 @@ DWORD svcctl_QueryServiceConfig2W(
}
DWORD
RPC_
MainLoop
(
void
)
DWORD
RPC_
Init
(
void
)
{
WCHAR
transport
[]
=
SVCCTL_TRANSPORT
;
WCHAR
endpoint
[]
=
SVCCTL_ENDPOINT
;
HANDLE
hSleepHandle
;
DWORD
err
;
if
((
err
=
RpcServerUseProtseqEpW
(
transport
,
0
,
endpoint
,
NULL
))
!=
ERROR_SUCCESS
)
...
...
@@ -1357,17 +1356,26 @@ DWORD RPC_MainLoop(void)
WINE_ERR
(
"RpcServerListen failed with error %u
\n
"
,
err
);
return
err
;
}
return
ERROR_SUCCESS
;
}
DWORD
RPC_MainLoop
(
void
)
{
DWORD
err
;
HANDLE
hExitEvent
=
__wine_make_process_system
();
WINE_TRACE
(
"Entered main loop
\n
"
);
hSleepHandle
=
__wine_make_process_system
();
SetEvent
(
g_hStartedEvent
);
WINE_TRACE
(
"Entered main loop
\n
"
);
do
{
err
=
WaitForSingleObjectEx
(
h
SleepHandle
,
INFINITE
,
TRUE
);
err
=
WaitForSingleObjectEx
(
h
ExitEvent
,
INFINITE
,
TRUE
);
WINE_TRACE
(
"Wait returned %d
\n
"
,
err
);
}
while
(
err
!=
WAIT_OBJECT_0
);
WINE_TRACE
(
"Object signaled - wine shutdown
\n
"
);
CloseHandle
(
hExitEvent
);
return
ERROR_SUCCESS
;
}
...
...
programs/services/services.c
View file @
559fafeb
...
...
@@ -454,7 +454,8 @@ int main(int argc, char *argv[])
return
err
;
if
((
err
=
scmdatabase_load_services
(
active_database
))
!=
ERROR_SUCCESS
)
return
err
;
err
=
RPC_MainLoop
();
if
((
err
=
RPC_Init
())
==
ERROR_SUCCESS
)
RPC_MainLoop
();
scmdatabase_destroy
(
active_database
);
return
err
;
}
programs/services/services.h
View file @
559fafeb
...
...
@@ -77,6 +77,7 @@ void service_unlock(struct service_entry *service);
extern
HANDLE
g_hStartedEvent
;
DWORD
RPC_Init
(
void
);
DWORD
RPC_MainLoop
(
void
);
/* from utils.c */
...
...
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