if (msg == NULL) {
daemon_msgs = (MSGS *)malloc(sizeof(MSGS));
memset(daemon_msgs, 0, sizeof(MSGS));
- for (i=1; i<=M_MAX; i++) {
+ for (i=3; i<=M_MAX; i++) {
add_msg_dest(daemon_msgs, MD_STDOUT, i, NULL, NULL);
}
Dmsg1(050, "Create daemon global message resource %p\n", daemon_msgs);
* This allow commands such as "estimate" to work.
* It probably should be restricted to work only in the FD.
*/
- if (jcr && jcr->JobId == 0 && jcr->dir_bsock && type != M_SECURITY) {
+ if (jcr && jcr->JobId == 0 && jcr->dir_bsock && type != M_SECURITY && type != M_EVENTS) {
BSOCK *dir = jcr->dir_bsock;
va_start(arg_ptr, fmt);
dir->msglen = bvsnprintf(dir->msg, sizeof_pool_memory(dir->msg),
/* Keep M_ABORT=1 for dlist.h */
M_ABORT = 1, /* MUST abort immediately */
M_DEBUG, /* debug message */
+ M_EVENTS, /* Event messages use event_send_msg() */
M_FATAL, /* Fatal error, stopping job */
M_ERROR, /* Error, but recoverable */
M_WARNING, /* Warning message */
M_RESTORED, /* ls -l of restored files */
M_SECURITY, /* security violation */
M_ALERT, /* tape alert messages */
- M_VOLMGMT, /* Volume management messages */
- M_EVENTS /* Event messages use event_send_msg() */
+ M_VOLMGMT /* Volume management messages */
};
-#define M_MAX M_EVENTS /* keep this updated ! */
+#define M_MAX M_VOLMGMT /* keep this updated ! */
#define M_ALL M_MAX+1
/* We cannot store more than this amount of custom events */