snmp4em 1.1.5 → 1.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.rdoc +4 -0
- data/lib/snmp4em/manager.rb +8 -1
- data/lib/snmp4em/snmp_request.rb +2 -2
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1fcda985f3fcfb3211c6de75baaef51802405047ac37c0e5223f5da628f0cd0e
|
4
|
+
data.tar.gz: 84067c9649b188ac4ede4d292667fbff5a30a3585649ad7bcb2deca6e02beef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b867a4c3c443e056e6476222862b2431a4c33a1a276f797a44e5c6e787bff8be1f0d6793750108c82d2ab482d17b4ca26f532badd3c7c74a50db8dc51372fb9f
|
7
|
+
data.tar.gz: a691215c902cb77fc50fb2e2be32ba347fcbea4f6f72dcb68d7d7f4f530ea0551651e02f0eba604ed433d1d5de1f67e561e2a6b339f91de57b222bf8c50b4e6d
|
data/README.rdoc
CHANGED
data/lib/snmp4em/manager.rb
CHANGED
@@ -33,7 +33,7 @@ module SNMP4EM
|
|
33
33
|
|
34
34
|
# Assigns an SNMP ID to an outgoing request so that it can be matched with its incoming response
|
35
35
|
def track_request(request)
|
36
|
-
|
36
|
+
untrack_request(request.snmp_id)
|
37
37
|
|
38
38
|
begin
|
39
39
|
@next_index = (@next_index + 1) % MAX_INDEX
|
@@ -42,6 +42,10 @@ module SNMP4EM
|
|
42
42
|
|
43
43
|
@pending_requests[request.snmp_id] = request
|
44
44
|
end
|
45
|
+
|
46
|
+
def untrack_request(snmp_id)
|
47
|
+
@pending_requests.delete(snmp_id)
|
48
|
+
end
|
45
49
|
end
|
46
50
|
|
47
51
|
attr_reader :host, :port, :timeout, :retries, :version, :community_ro, :community_rw
|
@@ -74,6 +78,9 @@ module SNMP4EM
|
|
74
78
|
|
75
79
|
def send_msg(message) # @private
|
76
80
|
self.class.socket.send_datagram message.encode, @host, @port
|
81
|
+
rescue EventMachine::ConnectionError
|
82
|
+
self.class.untrack_request message.pdu.request_id
|
83
|
+
raise
|
77
84
|
end
|
78
85
|
|
79
86
|
def wrap_in_fiber(request) # @private
|
data/lib/snmp4em/snmp_request.rb
CHANGED
@@ -52,12 +52,12 @@ module SNMP4EM
|
|
52
52
|
|
53
53
|
def init_callbacks # @private
|
54
54
|
self.callback do
|
55
|
-
Manager.
|
55
|
+
Manager.untrack_request(@snmp_id)
|
56
56
|
end
|
57
57
|
|
58
58
|
self.errback do
|
59
59
|
@timeout_timer.cancel
|
60
|
-
Manager.
|
60
|
+
Manager.untrack_request(@snmp_id)
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snmp4em
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Norman Elton
|
@@ -121,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '1.2'
|
123
123
|
requirements: []
|
124
|
-
|
125
|
-
rubygems_version: 2.6.8
|
124
|
+
rubygems_version: 3.0.3
|
126
125
|
signing_key:
|
127
126
|
specification_version: 4
|
128
127
|
summary: A high-performance SNMP engine built on EventMachine and Ruby-SNMP
|