projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* Initial work on IPv6-enabling citserver
[citadel.git]
/
citadel
/
serv_extensions.c
diff --git
a/citadel/serv_extensions.c
b/citadel/serv_extensions.c
index 0617cce0a750a0622258352736915230c5acdb35..c74dcb6d3901ac3a442b94ef761f6a8693e2136f 100644
(file)
--- a/
citadel/serv_extensions.c
+++ b/
citadel/serv_extensions.c
@@
-727,12
+727,11
@@
void CtdlRegisterServiceHook(int tcp_port,
{
struct ServiceFunctionHook *newfcn;
char *message;
{
struct ServiceFunctionHook *newfcn;
char *message;
- char
*error
;
+ char
error[SIZ]
;
- error = NULL;
- newfcn = (struct ServiceFunctionHook *)
- malloc(sizeof(struct ServiceFunctionHook));
- message = (char*) malloc (SIZ);
+ strcpy(error, "");
+ newfcn = (struct ServiceFunctionHook *) malloc(sizeof(struct ServiceFunctionHook));
+ message = (char*) malloc (SIZ + SIZ);
newfcn->next = ServiceHookTable;
newfcn->tcp_port = tcp_port;
newfcn->next = ServiceHookTable;
newfcn->tcp_port = tcp_port;
@@
-743,7
+742,7
@@
void CtdlRegisterServiceHook(int tcp_port,
newfcn->ServiceName = ServiceName;
if (sockpath != NULL) {
newfcn->ServiceName = ServiceName;
if (sockpath != NULL) {
- newfcn->msock =
ig_uds_server(sockpath, config.c_maxsessions, &
error);
+ newfcn->msock =
ctdl_uds_server(sockpath, config.c_maxsessions,
error);
snprintf(message, SIZ, "Unix domain socket '%s': ", sockpath);
}
else if (tcp_port <= 0) { /* port -1 to disable */
snprintf(message, SIZ, "Unix domain socket '%s': ", sockpath);
}
else if (tcp_port <= 0) { /* port -1 to disable */
@@
-753,10
+752,10
@@
void CtdlRegisterServiceHook(int tcp_port,
return;
}
else {
return;
}
else {
- newfcn->msock =
ig
_tcp_server(config.c_ip_addr,
+ newfcn->msock =
ctdl
_tcp_server(config.c_ip_addr,
tcp_port,
config.c_maxsessions,
tcp_port,
config.c_maxsessions,
-
&
error);
+ error);
snprintf(message, SIZ, "TCP port %s:%d: (%s) ",
config.c_ip_addr, tcp_port, ServiceName);
}
snprintf(message, SIZ, "TCP port %s:%d: (%s) ",
config.c_ip_addr, tcp_port, ServiceName);
}