Send Netdot-devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."


Today's Topics:

   1. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-114-g19ef20a ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Fri, 1 Nov 2013 13:19:02 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-114-g19ef20a
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  19ef20a3420cfb7a042712c40524a3578bfd728e (commit)
      from  092ea13de800caf5c02128c7e261f8c4224a94d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 19ef20a3420cfb7a042712c40524a3578bfd728e
Author: Carlos Vicente <[email protected]>
Date:   Wed Oct 30 18:55:03 2013 -0400

    Corrections

diff --git a/htdocs/management/updatedevice.html 
b/htdocs/management/updatedevice.html
index f810ce2..697a907 100644
--- a/htdocs/management/updatedevice.html
+++ b/htdocs/management/updatedevice.html
@@ -100,6 +100,10 @@ if ( $action eq "discover" ){
        if ( my $e = $@ ){
            $m->comp('/generic/error.mhtml', error=>$e);
        }
+
+       if ( !$info ){
+           $m->comp('/generic/error.mhtml', error=>'SNMP session failed.');
+       }
        
     }
     elsif ( $host ){
@@ -127,6 +131,11 @@ if ( $action eq "discover" ){
        if ( my $e = $@ ){
            $m->comp('/generic/error.mhtml', error=>$e);
        }
+
+       if ( !$info ){
+           $m->comp('/generic/error.mhtml', error=>'SNMP session failed.');
+       }
+
        print "info contains: <pre>", Dumper(%$info), "</pre>" if $DEBUG;
        
        # Make sure we don't have a device by this name already
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 28d5a8c..8091bf7 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -3925,7 +3925,7 @@ sub _get_snmp_session {
        }
 
        # We might already have a SNMP::Info class
-       $sclass ||= $self->{_sclass};
+       $sclass ||= $self->{_sclass} if defined $self->{_sclass};
        
        # Fill out some arguments if not given explicitly
        unless ( $argv{host} ){
@@ -3956,7 +3956,7 @@ sub _get_snmp_session {
        sqe           => $argv{sqe},
        );
 
-    if ( defined $sclass ) {
+    if ( defined $sclass && $sclass ne 'SNMP::Info' ) {
        $sinfoargs{AutoSpecify} = 0;
     }else{
        $sinfoargs{AutoSpecify} = 1;

-----------------------------------------------------------------------

Summary of changes:
 htdocs/management/updatedevice.html |    9 +++++++++
 lib/Netdot/Model/Device.pm          |    4 ++--
 2 files changed, 11 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel


End of Netdot-devel Digest, Vol 80, Issue 2
*******************************************

Reply via email to