summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-07-11 14:38:53 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2006-07-11 14:38:53 +0000
commitd68f654dab07b0f424ca4f5bc0f2349fac98ce34 (patch)
tree6b7e719086ab7d901cc9d8724a4a7917dbeab8b2 /src
parentefefa94f22a0736dee6cd4dae97503030b4d2f8e (diff)
- fixed processing of SNMP having non-standard port (Alexei)
git-svn-id: svn://svn.zabbix.com/trunk@3033 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'src')
-rw-r--r--src/zabbix_server/poller/checks_snmp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/zabbix_server/poller/checks_snmp.c b/src/zabbix_server/poller/checks_snmp.c
index 3dfe5b01..4c821b35 100644
--- a/src/zabbix_server/poller/checks_snmp.c
+++ b/src/zabbix_server/poller/checks_snmp.c
@@ -85,8 +85,10 @@ int get_value_snmp(DB_ITEM *item, AGENT_RESULT *value)
#ifdef NEW_APPROACH
snprintf(temp,sizeof(temp)-1,"%s:%d", item->ip, item->snmp_port);
session.peername = temp;
+ session.remote_port = item->snmp_port;
#else
session.peername = item->ip;
+ session.remote_port = item->snmp_port;
#endif
}
else
@@ -94,8 +96,10 @@ int get_value_snmp(DB_ITEM *item, AGENT_RESULT *value)
#ifdef NEW_APPROACH
snprintf(temp, sizeof(temp)-1, "%s:%d", item->host, item->snmp_port);
session.peername = temp;
+ session.remote_port = item->snmp_port;
#else
session.peername = item->host;
+ session.remote_port = item->snmp_port;
#endif
}
@@ -211,7 +215,9 @@ int get_value_snmp(DB_ITEM *item, AGENT_RESULT *value)
zabbix_log( LOG_LEVEL_DEBUG, "In get_value_SNMP() 0.2");
pdu = snmp_pdu_create(SNMP_MSG_GET);
- read_objid(item->snmp_oid, anOID, &anOID_len);
+/* Changed to snmp_parse_oid */
+/* read_objid(item->snmp_oid, anOID, &anOID_len);*/
+ snmp_parse_oid(item->snmp_oid, anOID, &anOID_len);
#if OTHER_METHODS
get_node("sysDescr.0", anOID, &anOID_len);