Handling is now to the point where user accounts requiring potential inbox processing...
[citadel.git] / citadel / serv_extensions.c
index f967e411be2be7c846f7002bfa9d173cff0738b3..7c16b6e0af37c9c9097822fef629186668304411 100644 (file)
@@ -2,7 +2,7 @@
  * 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.
@@ -110,7 +110,7 @@ XmsgFunctionHook *XmsgHookTable = NULL;
 
 /*
  * 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 {
@@ -853,9 +853,7 @@ void CtdlRegisterServiceHook(int tcp_port,
 {
        ServiceFunctionHook *newfcn;
        char *message;
-       char error[SIZ];
 
-       strcpy(error, "");
        newfcn = (ServiceFunctionHook *) malloc(sizeof(ServiceFunctionHook));
        message = (char*) malloc (SIZ + SIZ);
        
@@ -868,7 +866,7 @@ void CtdlRegisterServiceHook(int tcp_port,
        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 */
@@ -878,10 +876,7 @@ void CtdlRegisterServiceHook(int tcp_port,
                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);
        }
@@ -892,7 +887,7 @@ void CtdlRegisterServiceHook(int tcp_port,
                syslog(LOG_INFO, "%s", message);
        }
        else {
-               AddPortError(message, error);
+               AddPortError(message, "failed");
                strcat(message, "FAILED.");
                syslog(LOG_ERR, "%s", message);
                free(newfcn);