ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-SNMP/SNMP.pm
(Generate patch)

Comparing AnyEvent-SNMP/SNMP.pm (file contents):
Revision 1.13 by root, Mon Nov 24 18:16:54 2014 UTC vs.
Revision 1.14 by root, Wed Oct 9 18:22:59 2019 UTC

152} 152}
153 153
154use Net::SNMP (); 154use Net::SNMP ();
155use AnyEvent (); 155use AnyEvent ();
156 156
157our $VERSION = '6.0'; 157our $VERSION = '6.02';
158 158
159$Net::SNMP::DISPATCHER = instance Net::SNMP::Dispatcher; 159$Net::SNMP::DISPATCHER = instance Net::SNMP::Dispatcher;
160 160
161our $MESSAGE_PROCESSING = $Net::SNMP::Dispatcher::MESSAGE_PROCESSING; 161our $MESSAGE_PROCESSING = $Net::SNMP::Dispatcher::MESSAGE_PROCESSING;
162 162
257 257
258 # Set the error if applicable. 258 # Set the error if applicable.
259 $msg->error ($MESSAGE_PROCESSING->error) if $MESSAGE_PROCESSING->error; 259 $msg->error ($MESSAGE_PROCESSING->error) if $MESSAGE_PROCESSING->error;
260 260
261 # Notify the command generator to process the response. 261 # Notify the command generator to process the response.
262 $msg->process_response_pdu; 262 # Net::SNMP calls process_response_pdu, which simply calls callback_execute,
263 # but some errors cause $msg to be of type Net::SNMP::Message, not Net::SMMP::PDU,
264 # so we call the underlying callback_execute method which exists on both and
265 # seems to do the right thing.
266 $msg->callback_execute;
263 267
264 # Cancel the timeout. 268 # Cancel the timeout.
265 my $rtimeout_w = $msg->timeout_id; 269 my $rtimeout_w = $msg->timeout_id;
266 if ($$rtimeout_w) { 270 if ($$rtimeout_w) {
267 undef $$rtimeout_w; 271 undef $$rtimeout_w;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines