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
42fb9fe7
Commit
42fb9fe7
authored
Nov 25, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Properly initialize service status at creation time.
parent
3c88a2f0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
rpc.c
programs/services/rpc.c
+1
-1
services.c
programs/services/services.c
+3
-3
No files found.
programs/services/rpc.c
View file @
42fb9fe7
...
@@ -364,7 +364,7 @@ DWORD svcctl_CreateServiceW(
...
@@ -364,7 +364,7 @@ DWORD svcctl_CreateServiceW(
err
=
service_create
(
lpServiceName
,
&
entry
);
err
=
service_create
(
lpServiceName
,
&
entry
);
if
(
err
!=
ERROR_SUCCESS
)
if
(
err
!=
ERROR_SUCCESS
)
return
err
;
return
err
;
entry
->
config
.
dwServiceType
=
dwServiceType
;
entry
->
config
.
dwServiceType
=
entry
->
status
.
dwServiceType
=
dwServiceType
;
entry
->
config
.
dwStartType
=
dwStartType
;
entry
->
config
.
dwStartType
=
dwStartType
;
entry
->
config
.
dwErrorControl
=
dwErrorControl
;
entry
->
config
.
dwErrorControl
=
dwErrorControl
;
entry
->
config
.
lpBinaryPathName
=
strdupW
(
lpBinaryPathName
);
entry
->
config
.
lpBinaryPathName
=
strdupW
(
lpBinaryPathName
);
...
...
programs/services/services.c
View file @
42fb9fe7
...
@@ -71,6 +71,9 @@ DWORD service_create(LPCWSTR name, struct service_entry **entry)
...
@@ -71,6 +71,9 @@ DWORD service_create(LPCWSTR name, struct service_entry **entry)
return
ERROR_NOT_ENOUGH_SERVER_MEMORY
;
return
ERROR_NOT_ENOUGH_SERVER_MEMORY
;
}
}
(
*
entry
)
->
control_pipe
=
INVALID_HANDLE_VALUE
;
(
*
entry
)
->
control_pipe
=
INVALID_HANDLE_VALUE
;
(
*
entry
)
->
status
.
dwCurrentState
=
SERVICE_STOPPED
;
(
*
entry
)
->
status
.
dwWin32ExitCode
=
ERROR_SERVICE_NEVER_STARTED
;
/* all other fields are zero */
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -442,10 +445,7 @@ static DWORD scmdatabase_load_services(struct scmdatabase *db)
...
@@ -442,10 +445,7 @@ static DWORD scmdatabase_load_services(struct scmdatabase *db)
}
}
entry
->
status
.
dwServiceType
=
entry
->
config
.
dwServiceType
;
entry
->
status
.
dwServiceType
=
entry
->
config
.
dwServiceType
;
entry
->
status
.
dwCurrentState
=
SERVICE_STOPPED
;
entry
->
status
.
dwWin32ExitCode
=
ERROR_SERVICE_NEVER_STARTED
;
entry
->
db
=
db
;
entry
->
db
=
db
;
/* all other fields are zero */
list_add_tail
(
&
db
->
services
,
&
entry
->
entry
);
list_add_tail
(
&
db
->
services
,
&
entry
->
entry
);
}
}
...
...
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