Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Aug 2014 13:11:22 GMT
From:      shonali@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r272495 - soc2014/shonali/head/contrib/bsnmp/snmpd
Message-ID:  <201408161311.s7GDBM3p020403@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: shonali
Date: Sat Aug 16 13:11:22 2014
New Revision: 272495
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=272495

Log:
  Fixes for compile warnings
  

Modified:
  soc2014/shonali/head/contrib/bsnmp/snmpd/main.c
  soc2014/shonali/head/contrib/bsnmp/snmpd/snmpmod.h
  soc2014/shonali/head/contrib/bsnmp/snmpd/trap.c

Modified: soc2014/shonali/head/contrib/bsnmp/snmpd/main.c
==============================================================================
--- soc2014/shonali/head/contrib/bsnmp/snmpd/main.c	Sat Aug 16 12:59:47 2014	(r272494)
+++ soc2014/shonali/head/contrib/bsnmp/snmpd/main.c	Sat Aug 16 13:11:22 2014	(r272495)
@@ -372,7 +372,7 @@
  * on the user credentials against the configured User groups & VACM views.
  */
 enum snmp_code
-snmp_pdu_auth_access(struct snmp_pdu *pdu, int8_t *ip)
+snmp_pdu_auth_access(struct snmp_pdu *pdu, int32_t *ip)
 {
 	const char *uname;
 	int32_t suboid, smodel;

Modified: soc2014/shonali/head/contrib/bsnmp/snmpd/snmpmod.h
==============================================================================
--- soc2014/shonali/head/contrib/bsnmp/snmpd/snmpmod.h	Sat Aug 16 12:59:47 2014	(r272494)
+++ soc2014/shonali/head/contrib/bsnmp/snmpd/snmpmod.h	Sat Aug 16 13:11:22 2014	(r272495)
@@ -599,7 +599,7 @@
 void snmp_output(struct snmp_pdu *, u_char *, size_t *, const char *);
 void snmp_send_port(void *, const struct asn_oid *, struct snmp_pdu *,
 	const struct sockaddr *, socklen_t);
-enum snmp_code snmp_pdu_auth_access(struct snmp_pdu *, int8_t *);
+enum snmp_code snmp_pdu_auth_access(struct snmp_pdu *, int32_t *);
 
 /* sending traps */
 void snmp_send_trap(const struct asn_oid *, ...);

Modified: soc2014/shonali/head/contrib/bsnmp/snmpd/trap.c
==============================================================================
--- soc2014/shonali/head/contrib/bsnmp/snmpd/trap.c	Sat Aug 16 12:59:47 2014	(r272494)
+++ soc2014/shonali/head/contrib/bsnmp/snmpd/trap.c	Sat Aug 16 13:11:22 2014	(r272495)
@@ -126,7 +126,7 @@
 			break;
 
                 default:
-                        return (NULL);
+                        return (SNMP_ERR_WRONG_LENGTH);
         }
 	
 	if (tdep->set & TDEP_VERSION)
@@ -622,7 +622,7 @@
 	char *tag;
 	size_t sndlen;
 	ssize_t len;
-	int8_t ip[16];
+	int32_t ip[4];
 
 	TAILQ_FOREACH(t, &trapsink_list, link) {
 		if (t->status != TRAPSINK_ACTIVE)
@@ -858,7 +858,7 @@
 			break;
 				
                 default:
-                        return (NULL);
+                        return (SNMP_ERR_BADVALUE);
         }
        
  



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408161311.s7GDBM3p020403>