-/* $Id$ */
+/* $Id$
+ *
+ * Copyright (c) 1987-2009 by the citadel.org team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
#include "sysdep.h"
#if TIME_WITH_SYS_TIME
static void CtdlIPC_putline(CtdlIPC *ipc, const char *buf);
+
+const char *svn_revision(void);
+
/*
* Does nothing. The server should always return 200.
*/
safestrncpy(mret[0]->node, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "rcpt=", 5))
safestrncpy(mret[0]->recipient, &aaa[5], SIZ);
+ else if (!strncasecmp(aaa, "wefw=", 5))
+ safestrncpy(mret[0]->references, &aaa[5], SIZ);
else if (!strncasecmp(aaa, "time=", 5))
mret[0]->time = atol(&aaa[5]);
break;
case 15: ipc->ServInfo.newuser_disabled = atoi(buf);
break;
+ case 16: strcpy(ipc->ServInfo.default_cal_zone, buf);
+ break;
+ case 17: ipc->ServInfo.load_avg = atof(buf);
+ break;
+ case 18: ipc->ServInfo.worker_avg = atof(buf);
+ break;
+ case 19: ipc->ServInfo.thread_count = atoi(buf);
+ break;
+ case 20: ipc->ServInfo.has_sieve = atoi(buf);
+ break;
+ case 21: ipc->ServInfo.fulltext_enabled = atoi(buf);
+ break;
+ case 22: strcpy(ipc->ServInfo.svn_revision, buf);
+ break;
}
}
/* ENT0 */
-int CtdlIPCPostMessage(CtdlIPC *ipc, int flag, int *subject_required, const struct ctdlipcmessage *mr, char *cret)
+int CtdlIPCPostMessage(CtdlIPC *ipc, int flag, int *subject_required, struct ctdlipcmessage *mr, char *cret)
{
register int ret;
char cmd[SIZ];
+ char *ptr;
if (!cret) return -2;
if (!mr) return -2;
+ if (mr->references) {
+ for (ptr=mr->references; *ptr != 0; ++ptr) {
+ if (*ptr == '|') *ptr = '!';
+ }
+ }
+
snprintf(cmd, sizeof cmd,
- "ENT0 %d|%s|%d|%d|%s|%s", flag, mr->recipient,
- mr->anonymous, mr->type, mr->subject, mr->author);
+ "ENT0 %d|%s|%d|%d|%s|%s||||||%s|", flag, mr->recipient,
+ mr->anonymous, mr->type, mr->subject, mr->author, mr->references);
ret = CtdlIPCGenericCommand(ipc, cmd, mr->text, strlen(mr->text), NULL,
NULL, cret);
if ((flag == 0) && (subject_required != NULL)) {
}
-/* NETF */
-int CtdlIPCNetSendFile(CtdlIPC *ipc, const char *filename, const char *destnode, char *cret)
-{
- register int ret;
- char *aaa;
-
- if (!cret) return -2;
- if (!filename) return -2;
- if (!destnode) return -2;
-
- aaa = (char *)malloc(strlen(filename) + strlen(destnode) + 7);
- if (!aaa) return -1;
-
- sprintf(aaa, "NETF %s|%s", filename, destnode);
- ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret);
- free(aaa);
- return ret;
-}
-
-
/* RWHO */
int CtdlIPCOnlineUsers(CtdlIPC *ipc, char **listing, time_t *stamp, char *cret)
{