-static int c_notify (const notification_t *n,
- user_data_t __attribute__((unused)) *user_data)
-{
- NotifyNotification *notification = NULL;
- NotifyUrgency urgency = NOTIFY_URGENCY_LOW;
- int timeout = okay_timeout;
-
- char summary[1024];
-
- if (NOTIF_WARNING == n->severity) {
- urgency = NOTIFY_URGENCY_NORMAL;
- timeout = warn_timeout;
- }
- else if (NOTIF_FAILURE == n->severity) {
- urgency = NOTIFY_URGENCY_CRITICAL;
- timeout = fail_timeout;
- }
-
- ssnprintf (summary, sizeof (summary), "collectd %s notification",
- (NOTIF_FAILURE == n->severity) ? "FAILURE"
- : (NOTIF_WARNING == n->severity) ? "WARNING"
- : (NOTIF_OKAY == n->severity) ? "OKAY" : "UNKNOWN");
-
- notification = notify_notification_new (summary, n->message, NULL
-#if NOTIFY_CHECK_VERSION (0, 7, 0)
- );
+static int c_notify(const notification_t *n,
+ user_data_t __attribute__((unused)) * user_data) {
+ NotifyNotification *notification = NULL;
+ NotifyUrgency urgency = NOTIFY_URGENCY_LOW;
+ int timeout = okay_timeout;
+
+ char summary[1024];
+
+ if (NOTIF_WARNING == n->severity) {
+ urgency = NOTIFY_URGENCY_NORMAL;
+ timeout = warn_timeout;
+ } else if (NOTIF_FAILURE == n->severity) {
+ urgency = NOTIFY_URGENCY_CRITICAL;
+ timeout = fail_timeout;
+ }
+
+ ssnprintf(summary, sizeof(summary), "collectd %s notification",
+ (NOTIF_FAILURE == n->severity)
+ ? "FAILURE"
+ : (NOTIF_WARNING == n->severity)
+ ? "WARNING"
+ : (NOTIF_OKAY == n->severity) ? "OKAY" : "UNKNOWN");
+
+ notification = notify_notification_new(summary, n->message, NULL
+#if NOTIFY_CHECK_VERSION(0, 7, 0)
+ );