version 1.4, 1996/06/26 05:38:23 |
version 1.5, 1996/07/29 17:30:55 |
|
|
|
|
debugmsg(DM_MISC, "Current message logging config:"); |
debugmsg(DM_MISC, "Current message logging config:"); |
for (i = 0; msgfacility[i].mf_name; ++i) { |
for (i = 0; msgfacility[i].mf_name; ++i) { |
(void) sprintf(buf, " %s=", msgfacility[i].mf_name); |
(void) snprintf(buf, sizeof(buf), |
|
" %s=", msgfacility[i].mf_name); |
for (x = 0; msgtypes[x].mt_name; ++x) |
for (x = 0; msgtypes[x].mt_name; ++x) |
if (IS_ON(msgfacility[i].mf_msgtypes, |
if (IS_ON(msgfacility[i].mf_msgtypes, |
msgtypes[x].mt_type)) { |
msgtypes[x].mt_type)) { |
|
|
*/ |
*/ |
if (isserver && (msgfac->mf_msgfac != MF_SYSLOG && |
if (isserver && (msgfac->mf_msgfac != MF_SYSLOG && |
msgfac->mf_msgfac != MF_FILE)) { |
msgfac->mf_msgfac != MF_FILE)) { |
(void) sprintf(ebuf, |
(void) snprintf(ebuf, sizeof(ebuf), |
"The \"%s\" message facility cannot be used by the server.", |
"The \"%s\" message facility cannot be used by the server.", |
msgfac->mf_name); |
msgfac->mf_name); |
return(ebuf); |
return(ebuf); |
|
|
strcasecmp(word, "debug") == 0) |
strcasecmp(word, "debug") == 0) |
debug = DM_ALL; |
debug = DM_ALL; |
} else { |
} else { |
(void) sprintf(ebuf, "Message type \"%s\" is invalid.", |
(void) snprintf(ebuf, sizeof(ebuf), |
word); |
"Message type \"%s\" is invalid.", |
|
word); |
return(ebuf); |
return(ebuf); |
} |
} |
} |
} |
|
|
return("No message type specified"); |
return("No message type specified"); |
|
|
if ((msgfac = getmsgfac(word)) == NULL) { |
if ((msgfac = getmsgfac(word)) == NULL) { |
(void) sprintf(ebuf, |
(void) snprintf(ebuf, sizeof(ebuf), |
"%s is not a valid message facility", |
"%s is not a valid message facility", |
word); |
word); |
return(ebuf); |
return(ebuf); |
} |
} |
|
|
|
|
/* |
/* |
* Special cases |
* Special cases |
*/ |
*/ |
if (isserver && IS_ON(flags, MT_REMOTE)) |
if (isserver && IS_ON(flags, MT_NOTICE)) { |
|
msgsendstdout((MSGFACILITY *)NULL, MT_NOTICE, flags, mbuf); |
|
return; |
|
} else if (isserver && IS_ON(flags, MT_REMOTE)) |
msgsendstdout((MSGFACILITY *)NULL, MT_REMOTE, flags, mbuf); |
msgsendstdout((MSGFACILITY *)NULL, MT_REMOTE, flags, mbuf); |
else if (isserver && IS_ON(flags, MT_NERROR)) |
else if (isserver && IS_ON(flags, MT_NERROR)) |
msgsendstdout((MSGFACILITY *)NULL, MT_NERROR, flags, mbuf); |
msgsendstdout((MSGFACILITY *)NULL, MT_NERROR, flags, mbuf); |
else if (isserver && IS_ON(flags, MT_FERROR)) |
else if (isserver && IS_ON(flags, MT_FERROR)) |
msgsendstdout((MSGFACILITY *)NULL, MT_FERROR, flags, mbuf); |
msgsendstdout((MSGFACILITY *)NULL, MT_FERROR, flags, mbuf); |
else if (isserver && IS_ON(flags, MT_NOTICE)) { |
|
msgsendstdout((MSGFACILITY *)NULL, MT_NOTICE, flags, mbuf); |
|
return; |
|
} |
|
|
|
/* |
/* |
* For each Message Facility, check each Message Type to see |
* For each Message Facility, check each Message Type to see |