X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsnmp_agent.c;h=83cb8e33321e1dec6360d5e47172c8c3fb97a1ad;hb=e746ad785774de37a30302fef65f1c4aaf8698ab;hp=8441601b098a8c496d2abd7882c459fce6ee0001;hpb=f81a5a84d3d5fc941b624c28b1ab70971cc23ac9;p=collectd.git diff --git a/src/snmp_agent.c b/src/snmp_agent.c index 8441601b..83cb8e33 100644 --- a/src/snmp_agent.c +++ b/src/snmp_agent.c @@ -282,7 +282,8 @@ static int snmp_agent_validate_data(void) { return 0; } -static void snmp_agent_generate_oid2string(oid_t *oid, size_t offset, char *key) { +static void snmp_agent_generate_oid2string(oid_t *oid, size_t offset, + char *key) { int key_len = oid->oid[offset]; int i; @@ -369,8 +370,8 @@ static int snmp_agent_table_row_remove(table_definition_t *td, sstrncpy(n.host, hostname_g, sizeof(n.host)); sstrncpy(n.plugin_instance, ins, sizeof(n.plugin_instance)); snprintf(n.message, sizeof(n.message), - "Removed data row from table %s instance %s index %d", td->name, - ins, (index != NULL) ? *index : -1); + "Removed data row from table %s instance %s index %d", td->name, ins, + (index != NULL) ? *index : -1); plugin_dispatch_notification(&n); if (td->index_oid.oid_len) { @@ -616,9 +617,9 @@ snmp_agent_table_oid_handler(struct netsnmp_mib_handler_s *handler, if (dd->is_instance) { requests->requestvb->type = ASN_OCTET_STR; - snmp_set_var_typed_value(requests->requestvb, - requests->requestvb->type, (const u_char *)instance, - strlen((instance))); + snmp_set_var_typed_value( + requests->requestvb, requests->requestvb->type, + (const u_char *)instance, strlen((instance))); pthread_mutex_unlock(&g_agent->lock); @@ -1306,8 +1307,8 @@ static int snmp_agent_update_index(table_definition_t *td, sstrncpy(n.host, hostname_g, sizeof(n.host)); sstrncpy(n.plugin_instance, ins, sizeof(n.plugin_instance)); snprintf(n.message, sizeof(n.message), - "Data row added to table %s instance %s index %d", td->name, ins, - (index != NULL) ? *index : -1); + "Data row added to table %s instance %s index %d", td->name, ins, + (index != NULL) ? *index : -1); plugin_dispatch_notification(&n); return 0;