}
-
-
-/*
- * This loop recognizes all server commands.
- */
-void do_command_loop(void) {
- char cmdbuf[SIZ];
-
- time(&CC->lastcmd);
- memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
- if (client_getln(cmdbuf, sizeof cmdbuf) < 1) {
- syslog(LOG_ERR, "Citadel client disconnected: ending session.\n");
- CC->kill_me = KILLME_CLIENT_DISCONNECTED;
- return;
- }
-
- /* Log the server command, but don't show passwords... */
- if ( (strncasecmp(cmdbuf, "PASS", 4)) && (strncasecmp(cmdbuf, "SETP", 4)) ) {
- syslog(LOG_INFO, "[%d][%s(%ld)] %s",
- CC->cs_pid, CC->curr_user, CC->user.usernum, cmdbuf
- );
- }
- else {
- syslog(LOG_INFO, "[%d][%s(%ld)] <password command hidden from log>",
- CC->cs_pid, CC->curr_user, CC->user.usernum
- );
- }
-
- buffer_output();
-
- /*
- * Let other clients see the last command we executed, and
- * update the idle time, but not NOOP, QNOP, PEXP, GEXP, RWHO, or TIME.
- */
- if ( (strncasecmp(cmdbuf, "NOOP", 4))
- && (strncasecmp(cmdbuf, "QNOP", 4))
- && (strncasecmp(cmdbuf, "PEXP", 4))
- && (strncasecmp(cmdbuf, "GEXP", 4))
- && (strncasecmp(cmdbuf, "RWHO", 4))
- && (strncasecmp(cmdbuf, "TIME", 4)) ) {
- strcpy(CC->lastcmdname, " ");
- safestrncpy(CC->lastcmdname, cmdbuf, sizeof(CC->lastcmdname));
- time(&CC->lastidle);
- }
-
- if ((strncasecmp(cmdbuf, "ENT0", 4))
- && (strncasecmp(cmdbuf, "MESG", 4))
- && (strncasecmp(cmdbuf, "MSGS", 4)))
- {
- CC->cs_flags &= ~CS_POSTING;
- }
-
- if (!DLoader_Exec_Cmd(cmdbuf)) {
- cprintf("%d Unrecognized or unsupported command.\n", ERROR + CMD_NOT_SUPPORTED);
- }
-
- unbuffer_output();
-
- /* Run any after-each-command routines registered by modules */
- PerformSessionHooks(EVT_CMD);
-}
-
-
/*
* This loop performs all asynchronous functions.
*/
{
int ret;
- syslog(LOG_DEBUG, "-- db checkpoint --");
+ MARKM_syslog(LOG_DEBUG, "-- db checkpoint --");
ret = dbenv->txn_checkpoint(dbenv, MAX_CHECKPOINT_KBYTES, MAX_CHECKPOINT_MINUTES, 0);
if (ret != 0) {
--- /dev/null
+/*
+ * Citadel protocoll main dispatcher
+ *
+ * Copyright (c) 1987-2015 by the citadel.org team
+ *
+ * This program is open source software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License, version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <stdio.h>
+#include <libcitadel.h>
+
+#include "citserver.h"
+#include "ctdl_module.h"
+#include "config.h"
+/*
+ * This loop recognizes all server commands.
+ */
+void do_command_loop(void) {
+ struct CitContext *CCC = CC;
+ char cmdbuf[SIZ];
+
+ time(&CCC->lastcmd);
+ memset(cmdbuf, 0, sizeof cmdbuf); /* Clear it, just in case */
+ if (client_getln(cmdbuf, sizeof cmdbuf) < 1) {
+ CTDLM_syslog(LOG_INFO, "Citadel client disconnected: ending session.");
+ CCC->kill_me = KILLME_CLIENT_DISCONNECTED;
+ return;
+ }
+
+ /* Log the server command, but don't show passwords... */
+ if ( (strncasecmp(cmdbuf, "PASS", 4)) && (strncasecmp(cmdbuf, "SETP", 4)) ) {
+ CTDL_syslog(LOG_DEBUG, "[%s(%ld)] %s",
+ CCC->curr_user, CCC->user.usernum, cmdbuf
+ );
+ }
+ else {
+ CTDL_syslog(LOG_DEBUG, "[%s(%ld)] <password command hidden from log>",
+ CCC->curr_user, CCC->user.usernum
+ );
+ }
+
+ buffer_output();
+
+ /*
+ * Let other clients see the last command we executed, and
+ * update the idle time, but not NOOP, QNOP, PEXP, GEXP, RWHO, or TIME.
+ */
+ if ( (strncasecmp(cmdbuf, "NOOP", 4))
+ && (strncasecmp(cmdbuf, "QNOP", 4))
+ && (strncasecmp(cmdbuf, "PEXP", 4))
+ && (strncasecmp(cmdbuf, "GEXP", 4))
+ && (strncasecmp(cmdbuf, "RWHO", 4))
+ && (strncasecmp(cmdbuf, "TIME", 4)) ) {
+ strcpy(CCC->lastcmdname, " ");
+ safestrncpy(CCC->lastcmdname, cmdbuf, sizeof(CCC->lastcmdname));
+ time(&CCC->lastidle);
+ }
+
+ if ((strncasecmp(cmdbuf, "ENT0", 4))
+ && (strncasecmp(cmdbuf, "MESG", 4))
+ && (strncasecmp(cmdbuf, "MSGS", 4)))
+ {
+ CCC->cs_flags &= ~CS_POSTING;
+ }
+
+ if (!DLoader_Exec_Cmd(cmdbuf)) {
+ cprintf("%d Unrecognized or unsupported command.\n", ERROR + CMD_NOT_SUPPORTED);
+ }
+
+ unbuffer_output();
+
+ /* Run any after-each-command routines registered by modules */
+ PerformSessionHooks(EVT_CMD);
+}
+
*/
void cmd_ucls(char *cmd)
{
+ struct CitContext *CCC = CC;
FILE *fp;
char upload_notice[512];
static int seq = 0;
- if (CC->upload_fp == NULL) {
+ if (CCC->upload_fp == NULL) {
cprintf("%d You don't have an upload file open.\n", ERROR + RESOURCE_NOT_OPEN);
return;
}
fclose(CC->upload_fp);
- CC->upload_fp = NULL;
+ CCC->upload_fp = NULL;
- if ((!strcasecmp(cmd, "1")) && (CC->upload_type != UPL_FILE)) {
+ if ((!strcasecmp(cmd, "1")) && (CCC->upload_type != UPL_FILE)) {
cprintf("%d Upload completed.\n", CIT_OK);
- if (CC->upload_type == UPL_NET) {
+ if (CCC->upload_type == UPL_NET) {
char final_filename[PATH_MAX];
snprintf(final_filename, sizeof final_filename,
"%s/%s.%04lx.%04x",
ctdl_netin_dir,
- CC->net_node,
+ CCC->net_node,
(long)getpid(),
++seq
);
- if (link(CC->upl_path, final_filename) == 0) {
- syslog(LOG_INFO, "UCLS: updoaded %s\n",
+ if (link(CCC->upl_path, final_filename) == 0) {
+ CTDL_syslog(LOG_INFO, "UCLS: updoaded %s",
final_filename);
- unlink(CC->upl_path);
+ unlink(CCC->upl_path);
}
else {
- syslog(LOG_ALERT, "Cannot link %s to %s: %s\n",
- CC->upl_path, final_filename, strerror(errno)
+ CTDL_syslog(LOG_INFO, "Cannot link %s to %s: %s",
+ CCC->upl_path, final_filename, strerror(errno)
);
}
/* FIXME ... here we need to trigger a network run */
}
- CC->upload_type = UPL_FILE;
+ CCC->upload_type = UPL_FILE;
return;
}
if (!strcasecmp(cmd, "1")) {
- cprintf("%d File '%s' saved.\n", CIT_OK, CC->upl_path);
- fp = fopen(CC->upl_filedir, "a");
+ cprintf("%d File '%s' saved.\n", CIT_OK, CCC->upl_path);
+ fp = fopen(CCC->upl_filedir, "a");
if (fp == NULL) {
- fp = fopen(CC->upl_filedir, "w");
+ fp = fopen(CCC->upl_filedir, "w");
}
if (fp != NULL) {
- fprintf(fp, "%s %s %s\n", CC->upl_file,
- CC->upl_mimetype,
- CC->upl_comment);
+ fprintf(fp, "%s %s %s\n", CCC->upl_file,
+ CCC->upl_mimetype,
+ CCC->upl_comment);
fclose(fp);
}
- if ((CC->room.QRflags2 & QR2_NOUPLMSG) == 0) {
+ if ((CCC->room.QRflags2 & QR2_NOUPLMSG) == 0) {
/* put together an upload notice */
snprintf(upload_notice, sizeof upload_notice,
"NEW UPLOAD: '%s'\n %s\n%s\n",
- CC->upl_file,
- CC->upl_comment,
- CC->upl_mimetype);
- quickie_message(CC->curr_user, NULL, NULL, CC->room.QRname,
+ CCC->upl_file,
+ CCC->upl_comment,
+ CCC->upl_mimetype);
+ quickie_message(CCC->curr_user, NULL, NULL, CCC->room.QRname,
upload_notice, 0, NULL);
}
} else {
- abort_upl(CC);
- cprintf("%d File '%s' aborted.\n", CIT_OK, CC->upl_path);
+ abort_upl(CCC);
+ cprintf("%d File '%s' aborted.\n", CIT_OK, CCC->upl_path);
}
}
rc = fseek(CC->download_fp, start_pos, 0);
if (rc < 0) {
+ struct CitContext *CCC = CC;
cprintf("%d your file is smaller then %ld.\n", ERROR + ILLEGAL_VALUE, start_pos);
- syslog(LOG_ALERT, "your file %s is smaller then %ld. [%s]\n",
- CC->upl_path,
- start_pos,
- strerror(errno));
+ CTDL_syslog(LOG_ERR, "your file %s is smaller then %ld. [%s]\n",
+ CC->upl_path,
+ start_pos,
+ strerror(errno));
return;
}
*/
void cmd_writ(char *cmdbuf)
{
+ struct CitContext *CCC = CC;
int bytes;
char *buf;
int rv;
bytes = extract_int(cmdbuf, 0);
- if (CC->upload_fp == NULL) {
+ if (CCC->upload_fp == NULL) {
cprintf("%d You don't have an upload file open.\n", ERROR + RESOURCE_NOT_OPEN);
return;
}
cprintf("%d %d\n", SEND_BINARY, bytes);
buf = malloc(bytes + 1);
client_read(buf, bytes);
- rv = fwrite(buf, bytes, 1, CC->upload_fp);
+ rv = fwrite(buf, bytes, 1, CCC->upload_fp);
if (rv == -1) {
- syslog(LOG_EMERG, "Couldn't write: %s\n",
- strerror(errno));
+ CTDL_syslog(LOG_EMERG, "Couldn't write: %s\n",
+ strerror(errno));
}
free(buf);
}
*/
void cmd_ndop(char *cmdbuf)
{
+ struct CitContext *CCC = CC;
char pathname[256];
struct stat statbuf;
- if (IsEmptyStr(CC->net_node)) {
+ if (IsEmptyStr(CCC->net_node)) {
cprintf("%d Not authenticated as a network node.\n",
ERROR + NOT_LOGGED_IN);
return;
}
- if (CC->download_fp != NULL) {
+ if (CCC->download_fp != NULL) {
cprintf("%d You already have a download file open.\n",
ERROR + RESOURCE_BUSY);
return;
snprintf(pathname, sizeof pathname,
"%s/%s",
ctdl_netout_dir,
- CC->net_node);
+ CCC->net_node);
/* first open the file in append mode in order to create a
* zero-length file if it doesn't already exist
*/
- CC->download_fp = fopen(pathname, "a");
- if (CC->download_fp != NULL)
- fclose(CC->download_fp);
+ CCC->download_fp = fopen(pathname, "a");
+ if (CCC->download_fp != NULL)
+ fclose(CCC->download_fp);
/* now open it */
- CC->download_fp = fopen(pathname, "r");
- if (CC->download_fp == NULL) {
+ CCC->download_fp = fopen(pathname, "r");
+ if (CCC->download_fp == NULL) {
cprintf("%d cannot open %s: %s\n",
ERROR + INTERNAL_ERROR, pathname, strerror(errno));
return;
/* set this flag so other routines know that the download file
* currently open is a network spool file
*/
- CC->dl_is_net = 1;
+ CCC->dl_is_net = 1;
stat(pathname, &statbuf);
- CC->download_fp_total = statbuf.st_size;
+ CCC->download_fp_total = statbuf.st_size;
cprintf("%d %ld\n", CIT_OK, (long)statbuf.st_size);
}
*/
void cmd_goto(char *gargs)
{
+ struct CitContext *CCC = CC;
struct ctdlroom QRscratch;
int c;
int ok = 0;
extract_token(password, gargs, 1, '|', sizeof password);
transiently = extract_int(gargs, 2);
- CtdlGetUser(&CC->user, CC->curr_user);
+ CtdlGetUser(&CCC->user, CCC->curr_user);
/*
* Handle some of the macro named rooms
/* Then try a mailbox name match */
if (c != 0) {
CtdlMailboxName(augmented_roomname, sizeof augmented_roomname,
- &CC->user, towhere);
+ &CCC->user, towhere);
c = CtdlGetRoom(&QRscratch, augmented_roomname);
if (c == 0)
safestrncpy(towhere, augmented_roomname, sizeof towhere);
if (c == 0) {
/* Let internal programs go directly to any room. */
- if (CC->internal_pgm) {
- memcpy(&CC->room, &QRscratch,
+ if (CCC->internal_pgm) {
+ memcpy(&CCC->room, &QRscratch,
sizeof(struct ctdlroom));
CtdlUserGoto(NULL, 1, transiently, NULL, NULL, NULL, NULL);
return;
}
/* See if there is an existing user/room relationship */
- CtdlRoomAccess(&QRscratch, &CC->user, &ra, NULL);
+ CtdlRoomAccess(&QRscratch, &CCC->user, &ra, NULL);
/* normal clients have to pass through security */
if (ra & UA_GOTOALLOWED) {
if (ok == 1) {
if ((QRscratch.QRflags & QR_MAILBOX) &&
((ra & UA_GOTOALLOWED))) {
- memcpy(&CC->room, &QRscratch,
+ memcpy(&CCC->room, &QRscratch,
sizeof(struct ctdlroom));
CtdlUserGoto(NULL, 1, transiently, NULL, NULL, NULL, NULL);
return;
} else if ((QRscratch.QRflags & QR_PASSWORDED) &&
((ra & UA_KNOWN) == 0) &&
(strcasecmp(QRscratch.QRpasswd, password)) &&
- (CC->user.axlevel < AxAideU)
+ (CCC->user.axlevel < AxAideU)
) {
cprintf("%d wrong or missing passwd\n",
ERROR + PASSWORD_REQUIRED);
((QRscratch.QRflags & QR_PASSWORDED) == 0) &&
((QRscratch.QRflags & QR_GUESSNAME) == 0) &&
((ra & UA_KNOWN) == 0) &&
- (CC->user.axlevel < AxAideU)
+ (CCC->user.axlevel < AxAideU)
) {
- syslog(LOG_DEBUG, "Failed to acquire private room\n");
+ CTDLM_syslog(LOG_DEBUG, "Failed to acquire private room");
} else {
- memcpy(&CC->room, &QRscratch,
+ memcpy(&CCC->room, &QRscratch,
sizeof(struct ctdlroom));
CtdlUserGoto(NULL, 1, transiently, NULL, NULL, NULL, NULL);
return;
void cmd_einf(char *ok)
{ /* enter info file for current room */
+ struct CitContext *CCC = CC;
FILE *fp;
char infofilename[SIZ];
char buf[SIZ];
cprintf("%d Ok.\n", CIT_OK);
return;
}
- assoc_file_name(infofilename, sizeof infofilename, &CC->room, ctdl_info_dir);
- syslog(LOG_DEBUG, "opening\n");
+ assoc_file_name(infofilename, sizeof infofilename, &CCC->room, ctdl_info_dir);
+ CTDL_syslog(LOG_DEBUG, "opening %s", infofilename);
fp = fopen(infofilename, "w");
- syslog(LOG_DEBUG, "checking\n");
+ CTDLM_syslog(LOG_DEBUG, "checking");
if (fp == NULL) {
cprintf("%d Cannot open %s: %s\n",
ERROR + INTERNAL_ERROR, infofilename, strerror(errno));
fclose(fp);
/* now update the room index so people will see our new info */
- CtdlGetRoomLock(&CC->room, CC->room.QRname); /* lock so no one steps on us */
- CC->room.QRinfo = CC->room.QRhighest + 1L;
- CtdlPutRoomLock(&CC->room);
+ CtdlGetRoomLock(&CCC->room, CCC->room.QRname); /* lock so no one steps on us */
+ CCC->room.QRinfo = CCC->room.QRhighest + 1L;
+ CtdlPutRoomLock(&CCC->room);
}
if (pche == NULL) {
syslog(LOG_ERR,
"extnotify: filename of notification "
- "template not found in %s.\n",
+ "template not found in %s.",
pchs);
continue;
}
num_msgs = cdbfr->len / sizeof(long);
cdb_free(cdbfr);
} else {
- syslog(LOG_DEBUG,
- "extNotify_getConfigMessage: "
- "No config messages found\n");
+ MARKM_syslog(LOG_DEBUG,
+ "extNotify_getConfigMessage: "
+ "No config messages found");
return eNone; /* No messages at all? No further action. */
}
for (a = 0; a < num_msgs; ++a) {
if (IsEmptyStr(CtdlGetConfigStr("c_pager_program")) &&
IsEmptyStr(CtdlGetConfigStr("c_funambol_host")))
{
- syslog(LOG_ERR,
- "No external notifiers configured on system/user\n");
+ MARKM_syslog(LOG_DEBUG,
+ "No external notifiers configured on system/user");
return;
}
/*
* Go ahead and run the queue
*/
- syslog(LOG_DEBUG, "serv_extnotify: processing notify queue\n");
+ MARKM_syslog(LOG_DEBUG, "serv_extnotify: processing notify queue");
memset(&Ctx, 0, sizeof(NotifyContext));
if ((GetNotifyHosts(&Ctx) > 0) &&
(CtdlGetRoom(&CC->room, FNBL_QUEUE_ROOM) != 0))
{
- syslog(LOG_ERR, "Cannot find room <%s>\n", FNBL_QUEUE_ROOM);
+ syslog(LOG_ERR, "Cannot find room <%s>", FNBL_QUEUE_ROOM);
if (Ctx.nNotifyHosts > 0)
{
for (i = 0; i < Ctx.nNotifyHosts * 2; i++)
}
CtdlForEachMessage(MSGS_ALL, 0L, NULL,
SPOOLMIME, NULL, process_notify, &Ctx);
- syslog(LOG_DEBUG, "serv_extnotify: queue run completed\n");
+ MARKM_syslog(LOG_DEBUG, "serv_extnotify: queue run completed");
doing_queue = 0;
if (Ctx.nNotifyHosts > 0)
{
if ( (!HaveSpoolConfig(sc->RNCfg)) || (sc->room.QRhighest <= sc->RNCfg->lastsent) )
{
// There is nothing to send from this room.
- syslog(LOG_DEBUG, "Nothing to do for <%s>", room_to_spool->name);
+ MARK_syslog(LOG_DEBUG, "Nothing to do for <%s>", room_to_spool->name);
FreeRoomNetworkStruct(&sc->RNCfg);
sc->RNCfg = NULL;
free(sc);
*/
if (stat(ctdl_netin_dir, &statbuf)) return;
if (statbuf.st_mtime == last_spoolin_mtime) {
- syslog(LOG_DEBUG, "network: nothing in inbound queue");
+ MARKM_syslog(LOG_DEBUG, "network: nothing in inbound queue");
return;
}
last_spoolin_mtime = statbuf.st_mtime;
- syslog(LOG_DEBUG, "network: processing inbound queue");
+ MARKM_syslog(LOG_DEBUG, "network: processing inbound queue");
/*
* Ok, there's something interesting in there, so scan it.
if ( (time(NULL) - last_run) < CtdlGetConfigLong("c_net_freq") )
{
full_processing = 0;
- syslog(LOG_DEBUG, "Network full processing in %ld seconds.",
- CtdlGetConfigLong("c_net_freq") - (time(NULL)- last_run)
+ MARK_syslog(LOG_DEBUG, "Network full processing in %ld seconds.",
+ CtdlGetConfigLong("c_net_freq") - (time(NULL)- last_run)
);
}
int poll = 0;
if (GetCount(ignetcfg) ==0) {
- syslog(LOG_DEBUG, "network: no neighbor nodes are configured - not polling.\n");
+ MARKM_syslog(LOG_DEBUG, "network: no neighbor nodes are configured - not polling.\n");
return;
}
become_session(&networker_client_CC);
int num_activated = 0;
pthread_setspecific(MyConKey, (void *)&smtp_queue_CC);
- SMTPCM_syslog(LOG_INFO, "processing outbound queue");
+ SMTPCM_syslog(LOG_DEBUG, "processing outbound queue");
if (CtdlGetRoom(&CC->room, SMTP_SPOOLOUT_ROOM) != 0) {
SMTPC_syslog(LOG_ERR, "Cannot find room <%s>", SMTP_SPOOLOUT_ROOM);
smtp_do_procmsg,
&num_activated);
}
- SMTPC_syslog(LOG_INFO,
- "queue run completed; %d messages processed %d activated",
- num_processed, num_activated);
+ if (num_activated > 0) {
+ SMTPC_syslog(LOG_INFO,
+ "queue run completed; %d messages processed %d activated",
+ num_processed, num_activated);
+ }
}
int purged_something = 0;
struct CitContext *cptr;
- syslog(LOG_DEBUG, "xmpp_queue_event(%d, %s)\n", event_type, email_addr);
+ MARK_syslog(LOG_DEBUG, "xmpp_queue_event(%d, %s)\n", event_type, email_addr);
/* Purge events more than a minute old */
begin_critical_section(S_XMPP_QUEUE);
strcpy(actual_rm, force_room);
}
- MSG_syslog(LOG_INFO, "Final selection: %s (%s)\n", actual_rm, room);
+ MSG_syslog(LOG_DEBUG, "Final selection: %s (%s)\n", actual_rm, room);
if (strcasecmp(actual_rm, CCC->room.QRname)) {
/* CtdlGetRoom(&CCC->room, actual_rm); */
CtdlUserGoto(actual_rm, 0, 1, NULL, NULL, NULL, NULL);
if (retnew != NULL) *retnew = new_messages;
if (retoldest != NULL) *retoldest = oldest_message;
if (retnewest != NULL) *retnewest = newest_message;
- MSG_syslog(LOG_INFO, "<%s> %d new of %d total messages, oldest=%ld, newest=%ld",
+ MSG_syslog(LOG_DEBUG, "<%s> %d new of %d total messages, oldest=%ld, newest=%ld",
CCC->room.QRname, new_messages, total_messages, oldest_message, newest_message
);
struct floor flbuf;
visit vbuf;
- syslog(LOG_DEBUG, "CtdlCreateRoom(name=%s, type=%d, view=%d)", new_room_name, new_room_type, new_room_view);
+ MARK_syslog(LOG_DEBUG, "CtdlCreateRoom(name=%s, type=%d, view=%d)", new_room_name, new_room_type, new_room_view);
if (CtdlGetRoom(&qrbuf, new_room_name) == 0) {
- syslog(LOG_DEBUG, "Cannot create room <%s> - already exists", new_room_name);
+ MARK_syslog(LOG_DEBUG, "Cannot create room <%s> - already exists", new_room_name);
return(0);
}
int DebugModules = 0;
-
+int EnableMarkers = 0;
+int EnableCtlProto = 0;
+
/*
* Structure defentitions for hook tables
*/
{
DebugModules = n;
}
+void MarkersEnable(const int n)
+{
+ EnableMarkers = n;
+}
+void DebugCitadelProtoEnable(const int n)
+{
+ EnableCtlProto = n;
+}
+
CTDL_MODULE_INIT(modules)
{
if (!threading) {
CtdlRegisterDebugFlagHook(HKEY("modules"), DebugModulesEnable, &DebugModules);
+ CtdlRegisterDebugFlagHook(HKEY("periodicmarkers"), MarkersEnable, &EnableMarkers);
+ CtdlRegisterDebugFlagHook(HKEY("citadelprotocol"), DebugCitadelProtoEnable, &EnableCtlProto);
}
return "modules";
}
"%s Modules: " FORMAT, IOSTR);
+extern int EnableMarkers;
+#define MARKLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (EnableMarkers != 0))
+
+#define MARK_syslog(LEVEL, FORMAT, ...) \
+ MARKLOG(LEVEL) syslog(LEVEL, \
+ "%s: " FORMAT, IOSTR, __VA_ARGS__)
+
+#define MARKM_syslog(LEVEL, FORMAT) \
+ MARKLOG(LEVEL) syslog(LEVEL, \
+ "%s: " FORMAT, IOSTR);
+
+
+extern int EnableCtlProto;
+#define CTDLLOG(LEVEL) if ((LEVEL != LOG_DEBUG) || (EnableCtlProto != 0))
+
+#define CTDL_syslog(LEVEL, FORMAT, ...) \
+ CTDLLOG(LEVEL) syslog(LEVEL, \
+ "%s CC[%d]: " FORMAT, IOSTR, CCCID, __VA_ARGS__)
+
+#define CTDLM_syslog(LEVEL, FORMAT) \
+ CTDLLOG(LEVEL) syslog(LEVEL, \
+ "%s CC[%d]: " FORMAT, IOSTR, CCCID);
+
/*