aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librspamdclient.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-15 16:32:58 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-15 16:32:58 +0300
commite7ec4dc4dcc484973957c69d15ca8f7aa41aa73e (patch)
tree0e44f307e79f537a14b2cc0c6710790c4be788e3 /lib/librspamdclient.c
parent66f91e9ce180f82f11f3256dbd05127fe27de893 (diff)
downloadrspamd-e7ec4dc4dcc484973957c69d15ca8f7aa41aa73e.tar.gz
rspamd-e7ec4dc4dcc484973957c69d15ca8f7aa41aa73e.zip
Add support of uptime command to rspamc.0.3.8
Update manpages. Add script for generating manpages from pod.
Diffstat (limited to 'lib/librspamdclient.c')
-rw-r--r--lib/librspamdclient.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/librspamdclient.c b/lib/librspamdclient.c
index c1143d0be..fa92df208 100644
--- a/lib/librspamdclient.c
+++ b/lib/librspamdclient.c
@@ -1535,6 +1535,27 @@ rspamd_get_stat (GError **err)
return res;
}
+GString *
+rspamd_get_uptime (GError **err)
+{
+ struct rspamd_connection *c;
+ GString *res;
+ static const gchar outcmd[] = "uptime\r\n";
+
+ g_assert (client != NULL);
+
+ /* Connect to server */
+ c = rspamd_connect_random_server (TRUE, err);
+
+ if (c == NULL) {
+ return NULL;
+ }
+
+ res = rspamd_send_controller_command (c, outcmd, strlen (outcmd), -1, err);
+
+ return res;
+}
+
/*
* Free results
*/