* Citadel Extension Loader
* Originally written by Brian Costello <btx@calyx.net>
*
- * Copyright (c) 1987-2019 by the citadel.org team
+ * Copyright (c) 1987-2020 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.
/*
* RoomFunctionHook extensions are used for hooks which impliment room
- * processing functions when new messages are added EG. SIEVE.
+ * processing functions when new messages are added.
*/
typedef struct RoomFunctionHook RoomFunctionHook;
struct RoomFunctionHook {
{
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);