Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ac3f571e
Commit
ac3f571e
authored
Jan 28, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Store a list of service handles in service_entry.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9084b976
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
rpc.c
programs/services/rpc.c
+6
-0
services.c
programs/services/services.c
+3
-0
services.h
programs/services/services.h
+1
-0
No files found.
programs/services/rpc.c
View file @
ac3f571e
...
...
@@ -78,6 +78,7 @@ struct sc_manager_handle /* service control manager handle */
struct
sc_service_handle
/* service handle */
{
struct
sc_handle
hdr
;
struct
list
entry
;
struct
service_entry
*
service_entry
;
};
...
...
@@ -311,6 +312,7 @@ static void SC_RPC_HANDLE_destroy(SC_RPC_HANDLE handle)
{
struct
sc_service_handle
*
service
=
(
struct
sc_service_handle
*
)
hdr
;
service_lock
(
service
->
service_entry
);
list_remove
(
&
service
->
entry
);
if
(
service
->
service_entry
->
notify
&&
service
->
service_entry
->
notify
->
service
==
service
)
{
...
...
@@ -431,7 +433,11 @@ static DWORD create_handle_for_service(struct service_entry *entry, DWORD dwDesi
service
->
hdr
.
type
=
SC_HTYPE_SERVICE
;
service
->
hdr
.
access
=
dwDesiredAccess
;
RtlMapGenericMask
(
&
service
->
hdr
.
access
,
&
g_svc_generic
);
service_lock
(
entry
);
service
->
service_entry
=
entry
;
list_add_tail
(
&
entry
->
handles
,
&
service
->
entry
);
service_unlock
(
entry
);
*
phService
=
&
service
->
hdr
;
return
ERROR_SUCCESS
;
...
...
programs/services/services.c
View file @
ac3f571e
...
...
@@ -21,6 +21,7 @@
#define WIN32_LEAN_AND_MEAN
#include <stdarg.h>
#include <assert.h>
#include <windows.h>
#include <winsvc.h>
#include <rpc.h>
...
...
@@ -114,6 +115,7 @@ DWORD service_create(LPCWSTR name, struct service_entry **entry)
if
(
!*
entry
)
return
ERROR_NOT_ENOUGH_SERVER_MEMORY
;
(
*
entry
)
->
name
=
strdupW
(
name
);
list_init
(
&
(
*
entry
)
->
handles
);
if
(
!
(
*
entry
)
->
name
)
{
HeapFree
(
GetProcessHeap
(),
0
,
*
entry
);
...
...
@@ -136,6 +138,7 @@ DWORD service_create(LPCWSTR name, struct service_entry **entry)
void
free_service_entry
(
struct
service_entry
*
entry
)
{
assert
(
list_empty
(
&
entry
->
handles
));
CloseHandle
(
entry
->
status_changed_event
);
HeapFree
(
GetProcessHeap
(),
0
,
entry
->
name
);
HeapFree
(
GetProcessHeap
(),
0
,
entry
->
config
.
lpBinaryPathName
);
...
...
programs/services/services.h
View file @
ac3f571e
...
...
@@ -67,6 +67,7 @@ struct service_entry
BOOL
is_wow64
;
BOOL
status_notified
;
struct
sc_notify_handle
*
notify
;
struct
list
handles
;
};
extern
struct
scmdatabase
*
active_database
;
...
...
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