-#include "meta.h"
-#include "connection.h"
-
-#include "system.h"
-
-/* Status and error notification routines */
-
-int send_status(connection_t * c, int statusno, char *statusstring)
-{
- cp();
-
- if(!statusstring)
- statusstring = status_text[statusno];
-
- return send_request(c, "%d %d %s", STATUS, statusno, statusstring);
-}
-
-int status_h(connection_t * c)
-{
- int statusno;
- char statusstring[MAX_STRING_SIZE];
-
- cp();
-
- if(sscanf(c->buffer, "%*d %d " MAX_STRING, &statusno, statusstring) != 2) {
- syslog(LOG_ERR, _("Got bad %s from %s (%s)"), "STATUS",
- c->name, c->hostname);
- return -1;
- }
-
- if(debug_lvl >= DEBUG_STATUS) {
- syslog(LOG_NOTICE, _("Status message from %s (%s): %s: %s"),
- c->name, c->hostname, status_text[statusno], statusstring);
- }
-
- return 0;
-}
-
-int send_error(connection_t * c, int err, char *errstring)
-{
- cp();
-
- if(!errstring)
- errstring = strerror(err);
-
- return send_request(c, "%d %d %s", ERROR, err, errstring);
-}
-
-int error_h(connection_t * c)
-{
- int err;
- char errorstring[MAX_STRING_SIZE];
-
- cp();