* usually more strict because you're not really supposed to dump/load and
* upgrade at the same time.
*/
-#define REV_LEVEL 724 /* This version */
+#define REV_LEVEL 725 /* This version */
#define REV_MIN 591 /* Oldest compatible database */
-#define EXPORT_REV_MIN 722 /* Oldest compatible export files */
+#define EXPORT_REV_MIN 725 /* Oldest compatible export files */
#define SERVER_TYPE 0 /* zero for stock Citadel; other developers please
obtain SERVER_TYPE codes for your implementations */
cprintf("%s\n", config.c_master_pass);
cprintf("%s\n", config.c_pager_program);
cprintf("%d\n", config.c_imap_keep_from);
+ cprintf("%d\n", config.c_xmpp_c2s_port);
+ cprintf("%d\n", config.c_xmpp_s2s_port);
cprintf("000\n");
}
case 61:
config.c_imap_keep_from = atoi(buf);
break;
+ case 62:
+ config.c_xmpp_c2s_port = atoi(buf);
+ break;
+ case 63:
+ config.c_xmpp_s2s_port = atoi(buf);
+ break;
}
++a;
}
CFG_VALUE(STRING_BUF(c_master_pass, 32), " Master user password ");
CFG_VALUE(STRING_BUF(c_pager_program, 256), " External pager program (blank to disable)");
CFG_VALUE(CHAR(c_imap_keep_from), " IMAP keep original from header in msgs");
+CFG_VALUE(INTEGER(c_xmpp_c2s_port), " XMPP client-to-server port (usually 5222)");
+CFG_VALUE(INTEGER(c_xmpp_s2s_port), " XMPP server-to-server port (usually 5269)");
{
#ifdef HAVE_EXPAT
if (!threading) {
- CtdlRegisterServiceHook(5222, /* FIXME change to config.c_xmpp_port */
+ CtdlRegisterServiceHook(config.c_xmpp_c2s_port,
NULL,
xmpp_greeting,
xmpp_command_loop,
config.c_auto_cull = 1;
}
+ if (CitControl.version < 725) {
+ config.c_xmpp_c2s_port = 5222;
+ config.c_xmpp_s2s_port = 5269;
+ }
+
put_config();
}
if (config.c_imaps_port == 0) config.c_imaps_port = 993;
if (config.c_pftcpdict_port == 0) config.c_pftcpdict_port = -1;
if (config.c_managesieve_port == 0) config.c_managesieve_port = 2020;
+ if (config.c_xmpp_c2s_port == 0) config.c_xmpp_c2s_port = 5222;
+ if (config.c_xmpp_s2s_port == 0) config.c_xmpp_s2s_port = 5269;
/* Go through a series of dialogs prompting for config info */
for (curr = 1; curr <= MAXSETUP; ++curr) {
void do_system_configuration(CtdlIPC *ipc)
{
-#define NUM_CONFIGS 61
+#define NUM_CONFIGS 63
char buf[256];
char sc[NUM_CONFIGS][256];
strprompt("SMTPS server port (-1 to disable)", &sc[41][0], 5);
strprompt("Postfix TCP Dictionary Port server port (-1 to disable)", &sc[50][0], 5);
strprompt("ManageSieve server port (-1 to disable)", &sc[51][0], 5);
+ strprompt("XMPP (Jabber) client to server port (-1 to disable)", &sc[62][0], 5);
+
+ /* No prompt because we don't implement this service yet, it's just a placeholder */
+ /* strprompt("XMPP (Jabber) server to server port (-1 to disable)", &sc[63][0], 5); */
+
/* This logic flips the question around, because it's one of those
* situations where 0=yes and 1=no
*/
a);
a = (a ? 0 : 1);
snprintf(sc[25], sizeof sc[25], "%d", a);
+
+ /* This logic flips the question around, because it's one of those
+ * situations where 0=yes and 1=no
+ */
+ a = atoi(sc[61]);
+ a = (a ? 0 : 1);
+ a = boolprompt("Force IMAP posts in public rooms to be from the user who submitted them", a);
+ a = (a ? 0 : 1);
+ snprintf(sc[61], sizeof sc[61], "%d", a);
+
snprintf(sc[45], sizeof sc[45], "%d", (boolprompt(
"Allow unauthenticated SMTP clients to spoof my domains",
atoi(&sc[45][0]))));
((atoi(buf) != 0) ? "CHECKED" : ""));
sprintf(&network[strlen(network)], "</TD></TR>\n");
break;
+ case 62:
+ sprintf(&network[strlen(network)], "<tr><td>");
+ sprintf(&network[strlen(network)], _("XMPP (Jabber) client to server port (-1 to disable)"));
+ sprintf(&network[strlen(network)], "</td><td>");
+ sprintf(&network[strlen(network)], "<input type=\"text\" name=\"c_xmpp_c2s_port\" maxlength=\"5\" value=\"%s\">", buf);
+ sprintf(&network[strlen(network)], "</TD></TR>\n");
+ break;
+ case 63:
+ sprintf(&network[strlen(network)], "<tr><td>");
+ sprintf(&network[strlen(network)], _("XMPP (Jabber) server to server port (-1 to disable)"));
+ sprintf(&network[strlen(network)], "</td><td>-1");
+ sprintf(&network[strlen(network)], "<input type=\"hidden\" name=\"c_xmpp_s2s_port\" value=\"%s\">\n", buf);
+ sprintf(&network[strlen(network)], "</TD></TR>\n");
+ break;
}
}
serv_printf("%s", bstr("c_master_pass"));
serv_printf("%s", bstr("c_pager_program"));
serv_printf("%s", ((!strcasecmp(bstr("c_imap_keep_from"), "yes") ? "1" : "0")));
+ serv_printf("%s", bstr("c_xmpp_c2s_port"));
+ serv_printf("%s", bstr("c_xmpp_s2s_port"));
serv_printf("000");
serv_printf("SPEX site|%d|%d", atoi(bstr("sitepolicy")), atoi(bstr("sitevalue")));