Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Maintenance:507
net-snmp.openSUSE_11.4_Update
net-snmp-5.6.1-reduce-code-duplication-in-agent...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File net-snmp-5.6.1-reduce-code-duplication-in-agentx.patch of Package net-snmp.openSUSE_11.4_Update
commit 7bead9ca917c67566d5ed98ab507bbc02816217d Author: Bart Van Assche <bvanassche@acm.org> Date: Wed Nov 30 14:08:08 2011 +0100 AgentX subagent: Reduce code duplication Index: net-snmp-5.6.1/agent/mibgroup/agentx/subagent.c =================================================================== --- net-snmp-5.6.1.orig/agent/mibgroup/agentx/subagent.c +++ net-snmp-5.6.1/agent/mibgroup/agentx/subagent.c @@ -764,6 +764,7 @@ subagent_open_master_session(void) { netsnmp_transport *t; netsnmp_session sess; + const char *agentx_socket; DEBUGMSGTL(("agentx/subagent", "opening session...\n")); @@ -781,9 +782,9 @@ subagent_open_master_session(void) sess.callback = handle_agentx_packet; sess.authenticator = NULL; - t = netsnmp_transport_open_client( - "agentx", netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_X_SOCKET)); + agentx_socket = netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID, + NETSNMP_DS_AGENT_X_SOCKET); + t = netsnmp_transport_open_client("agentx", agentx_socket); if (t == NULL) { /* * Diagnose snmp_open errors with the input @@ -792,12 +793,9 @@ subagent_open_master_session(void) if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_CONNECTION_WARNINGS)) { char buf[1024]; - const char *socket = - netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_X_SOCKET); snprintf(buf, sizeof(buf), "Warning: " "Failed to connect to the agentx master agent (%s)", - socket ? socket : "[NIL]"); + agentx_socket ? agentx_socket : "[NIL]"); if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_NO_ROOT_ACCESS)) { netsnmp_sess_log_error(LOG_WARNING, buf, &sess); @@ -818,8 +816,7 @@ subagent_open_master_session(void) char buf[1024]; snprintf(buf, sizeof(buf), "Error: " "Failed to create the agentx master agent session (%s)", - netsnmp_ds_get_string(NETSNMP_DS_APPLICATION_ID, - NETSNMP_DS_AGENT_X_SOCKET)); + agentx_socket); snmp_sess_perror(buf, &sess); } netsnmp_transport_free(t);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor