win32-service 0.8.2 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES +7 -0
- data/lib/win32/daemon.rb +7 -3
- data/lib/win32/service.rb +6 -2
- data/test/test_win32_daemon.rb +1 -1
- data/test/test_win32_service.rb +1 -1
- data/win32-service.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00420c9a08f4efbc505916adfdf394aaa827d88d
|
4
|
+
data.tar.gz: 7cc804d073520c13b7a0d3cb376eef7594131d7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2468f2cddb5f34466323c9e000d5655fe533c67b120e836bb79cdc08359afc44087b35031a3815d6d2b809650c7c060dfe8f51779f2e0c201f29c6462b16550d
|
7
|
+
data.tar.gz: d37585b5947428e224cd0840ddc806c6a5359971a1eedd3bd3b325eff0a1914e1c5fb07177a10a5ed81a01cb9b644a49e3e6b351fb302e5d5e43e5ca5da1621d
|
data/CHANGES
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
== 0.8.3 - 1-Nov-2013
|
2
|
+
* Fixed a bug where a service's state could be changed when merely
|
3
|
+
interrogating the service. Thanks go to Glenn Sarti / Puppet Labs
|
4
|
+
for the spot.
|
5
|
+
* Fixed a bug where attempting to get the description of a service that
|
6
|
+
has no description could raise an error. Now an empty string is returned.
|
7
|
+
|
1
8
|
== 0.8.2 - 13-Aug-2013
|
2
9
|
* Fixed a bug in the Service.start method where it was not handling arguments
|
3
10
|
properly. Thanks go to Sean Karlage for the spot.
|
data/lib/win32/daemon.rb
CHANGED
@@ -18,7 +18,7 @@ module Win32
|
|
18
18
|
extend Windows::Functions
|
19
19
|
|
20
20
|
# The version of this library
|
21
|
-
VERSION = '0.8.
|
21
|
+
VERSION = '0.8.3'
|
22
22
|
|
23
23
|
private
|
24
24
|
|
@@ -118,10 +118,14 @@ module Win32
|
|
118
118
|
dwState = SERVICE_PAUSED
|
119
119
|
when SERVICE_CONTROL_CONTINUE
|
120
120
|
dwState = SERVICE_RUNNING
|
121
|
+
#else
|
122
|
+
# TODO: Handle other control codes? Retain the current state?
|
121
123
|
end
|
122
124
|
|
123
|
-
# Set the status of the service.
|
124
|
-
|
125
|
+
# Set the status of the service except on interrogation.
|
126
|
+
unless dwCtrlCode == SERVICE_CONTROL_INTERROGATE
|
127
|
+
SetTheServiceStatus.call(dwState, NO_ERROR, 0, 0)
|
128
|
+
end
|
125
129
|
|
126
130
|
# Tell service_main thread to stop.
|
127
131
|
if dwCtrlCode == SERVICE_CONTROL_STOP || dwCtrlCode == SERVICE_CONTROL_SHUTDOWN
|
data/lib/win32/service.rb
CHANGED
@@ -17,7 +17,7 @@ module Win32
|
|
17
17
|
extend Windows::Functions
|
18
18
|
|
19
19
|
# The version of the win32-service library
|
20
|
-
VERSION = '0.8.
|
20
|
+
VERSION = '0.8.3'
|
21
21
|
|
22
22
|
# SCM security and access rights
|
23
23
|
|
@@ -1064,7 +1064,7 @@ module Win32
|
|
1064
1064
|
|
1065
1065
|
buf = get_config2_info(handle_scs, SERVICE_CONFIG_DESCRIPTION)
|
1066
1066
|
|
1067
|
-
if buf.read_pointer.null?
|
1067
|
+
if buf.is_a?(Fixnum) || buf.read_pointer.null?
|
1068
1068
|
description = ''
|
1069
1069
|
else
|
1070
1070
|
description = buf.read_pointer.read_string
|
@@ -1338,6 +1338,10 @@ module Win32
|
|
1338
1338
|
|
1339
1339
|
err_num = FFI.errno
|
1340
1340
|
|
1341
|
+
# This is a bit hacky since it means we have to check the type of value
|
1342
|
+
# we get back, but we don't always want to raise an error either,
|
1343
|
+
# depending on what we're trying to get at.
|
1344
|
+
#
|
1341
1345
|
if !bool && err_num == ERROR_INSUFFICIENT_BUFFER
|
1342
1346
|
config2_buf = FFI::MemoryPointer.new(:char, bytes_needed.read_ulong)
|
1343
1347
|
elsif err_num == ERROR_FILE_NOT_FOUND
|
data/test/test_win32_daemon.rb
CHANGED
data/test/test_win32_service.rb
CHANGED
data/win32-service.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
version: '0'
|
113
113
|
requirements: []
|
114
114
|
rubyforge_project:
|
115
|
-
rubygems_version: 2.
|
115
|
+
rubygems_version: 2.1.10
|
116
116
|
signing_key:
|
117
117
|
specification_version: 4
|
118
118
|
summary: An interface for MS Windows services
|