char *oid_str_ptr[MAX_OID_LEN];
for (size_t i = 0; i < o->oid_len; i++) {
- ssnprintf(oid_str[i], sizeof(oid_str[i]), "%lu", (unsigned long)o->oid[i]);
+ snprintf(oid_str[i], sizeof(oid_str[i]), "%lu", (unsigned long)o->oid[i]);
oid_str_ptr[i] = oid_str[i];
}
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;
.severity = NOTIF_WARNING, .time = cdtime(), .plugin = PLUGIN_NAME};
sstrncpy(n.host, hostname_g, sizeof(n.host));
sstrncpy(n.plugin_instance, ins, sizeof(n.plugin_instance));
- ssnprintf(n.message, sizeof(n.message),
- "Removed data row from table %s instance %s index %d", td->name,
- ins, (index != NULL) ? *index : -1);
+ snprintf(n.message, sizeof(n.message),
+ "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) {
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);
.severity = NOTIF_OKAY, .time = cdtime(), .plugin = PLUGIN_NAME};
sstrncpy(n.host, hostname_g, sizeof(n.host));
sstrncpy(n.plugin_instance, ins, sizeof(n.plugin_instance));
- ssnprintf(n.message, sizeof(n.message),
- "Data row added to table %s instance %s index %d", td->name, ins,
- (index != NULL) ? *index : -1);
+ snprintf(n.message, sizeof(n.message),
+ "Data row added to table %s instance %s index %d", td->name, ins,
+ (index != NULL) ? *index : -1);
plugin_dispatch_notification(&n);
return 0;