static size_t nSizPort = 0;
static char *errormessages = NULL;
-static size_t nSizErrmsg = 0;
+size_t nSizErrmsg = 0;
-static long DetailErrorFlags;
+long DetailErrorFlags;
char *ErrSubject = "Startup Problems";
char *ErrGeneral = "Citadel had trouble on starting up. %s This means, citadel won't be the service provider for a specific service you configured it to.\n\n"
snprintf(Message, n * SIZ, ErrGeneral, Short, Where, List, Hint, DetailList);
+ lprintf(0,Message);
+ lprintf(0,ErrSubject);
quickie_message("Citadel", NULL, NULL, AIDEROOM, Message, FMT_FIXED, ErrSubject);
if (errormessages!=NULL) free (errormessages);
errormessages = NULL;
void CtdlRegisterServiceHook(int tcp_port,
- char *sockpath,
- void (*h_greeting_function) (void),
- void (*h_command_function) (void),
- void (*h_async_function) (void)
- )
+ char *sockpath,
+ void (*h_greeting_function) (void),
+ void (*h_command_function) (void),
+ void (*h_async_function) (void),
+ const char *ServiceName)
{
struct ServiceFunctionHook *newfcn;
char *message;
newfcn->h_greeting_function = h_greeting_function;
newfcn->h_command_function = h_command_function;
newfcn->h_async_function = h_async_function;
+ newfcn->ServiceName = ServiceName;
if (sockpath != NULL) {
newfcn->msock = ig_uds_server(sockpath, config.c_maxsessions, &error);
snprintf(message, SIZ, "Unix domain socket '%s': ", sockpath);
}
else if (tcp_port <= 0) { /* port -1 to disable */
- lprintf(CTDL_INFO, "Service has been manually disabled, skipping\n");
+ lprintf(CTDL_INFO, "Service %s has been manually disabled, skipping\n", ServiceName);
free (message);
free(newfcn);
return;
tcp_port,
config.c_maxsessions,
&error);
- snprintf(message, SIZ, "TCP port %s:%d: ",
- config.c_ip_addr, tcp_port);
+ snprintf(message, SIZ, "TCP port %s:%d: (%s) ",
+ config.c_ip_addr, tcp_port, ServiceName);
}
if (newfcn->msock > 0) {