+/* Send generic log message. */
+int send_log_msg(char *script, char *host, char *msg)
+{
+ char sys_location[1024 +1];
+
+ sys_location[1024] = '\0';
+ snprintf(sys_location, 1024, "(%s) %s->%s", script, host, SYSCHECK);
+
+ if(SendMSG(lessdc.queue, msg, sys_location, LOCALFILE_MQ) < 0)
+ {
+ merror(QUEUE_SEND, ARGV0);
+ if((lessdc.queue = StartMQ(DEFAULTQPATH, WRITE)) < 0)
+ {
+ ErrorExit(QUEUE_FATAL, ARGV0, DEFAULTQPATH);
+ }
+
+ /* If we reach here, we can try to send it again */
+ SendMSG(lessdc.queue, msg, sys_location, LOCALFILE_MQ);
+ }
+ return(0);
+}
+
+
+