* Citadel Extension Loader
* Originally written by Brian Costello <btx@calyx.net>
*
- * Copyright (c) 1987-2017 by the citadel.org team
+ * Copyright (c) 1987-2019 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.
static StrBuf *portlist = NULL;
-
static StrBuf *errormessages = NULL;
ConstStr ErrPortWhere = { HKEY("\"Admin->System Preferences->Network\".\n\nThe failed ports and sockets are: ")};
ConstStr ErrPortHint = { HKEY("If you want Citadel to provide you with that functionality, "
"check the output of \"netstat -lnp\" on Linux, or \"netstat -na\" on BSD"
- " and stop the program that binds these ports.\n You should eventually remove "
- " their initscripts in /etc/init.d so that you won't get this trouble once more.\n"
- " After that goto \"Administration -> Shutdown Citadel\" to make Citadel restart & retry to bind this port.\n")};
+ " and disable the program that binds these ports.\n")};
void LogPrintMessages(long err)
{
ServiceFunctionHook *newfcn;
char *message;
- char error[SIZ];
- strcpy(error, "");
newfcn = (ServiceFunctionHook *) malloc(sizeof(ServiceFunctionHook));
message = (char*) malloc (SIZ + SIZ);
newfcn->ServiceName = ServiceName;
if (sockpath != NULL) {
- newfcn->msock = ctdl_uds_server(sockpath, CtdlGetConfigInt("c_maxsessions"), error);
+ newfcn->msock = ctdl_uds_server(sockpath, CtdlGetConfigInt("c_maxsessions"));
snprintf(message, SIZ, "extensions: unix domain socket '%s': ", sockpath);
}
else if (tcp_port <= 0) { /* port -1 to disable */
return;
}
else {
- newfcn->msock = ctdl_tcp_server(CtdlGetConfigStr("c_ip_addr"),
- tcp_port,
- CtdlGetConfigInt("c_maxsessions"),
- error);
+ newfcn->msock = ctdl_tcp_server(CtdlGetConfigStr("c_ip_addr"), tcp_port, CtdlGetConfigInt("c_maxsessions"));
snprintf(message, SIZ, "extensions: TCP port %s:%d: (%s) ",
CtdlGetConfigStr("c_ip_addr"), tcp_port, ServiceName);
}
syslog(LOG_INFO, "%s", message);
}
else {
- AddPortError(message, error);
+ AddPortError(message, "failed");
strcat(message, "FAILED.");
syslog(LOG_ERR, "%s", message);
free(newfcn);