Skip to content

Commit

Permalink
do not exit eggdrop when rehashing
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelortmann committed Jul 3, 2024
1 parent 7e5ef67 commit 6a5948b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tcldcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,8 +1108,10 @@ static int setlisten(Tcl_Interp *irp, char *ip, char *portp, char *type, char *m
if (ipv4) {
if ((ipaddr4.s_addr != 0) && (dcc[idx].sockname.addr.s4.sin_addr.s_addr == 0)) {
Tcl_AppendResult(irp, "This port is already bound to 0.0.0.0 on this "
"machine, remove it (using listen [ip] <port> off) before "
"trying to bind to this IP.", NULL);
"machine, remove it (using listen [ip] <port> off) before "
"trying to bind to this IP.", NULL);
if (do_restart == -2) /* do not exit eggdrop when rehashing */
return TCL_OK;
return TCL_ERROR;
}
}
Expand All @@ -1119,6 +1121,8 @@ static int setlisten(Tcl_Interp *irp, char *ip, char *portp, char *type, char *m
Tcl_AppendResult(irp, "This port is already bound to :: on this "
"machine, remove it (using listen [ip] <port> off) before "
"trying to bind to this IP.", NULL);
if (do_restart == -2) /* do not exit eggdrop when rehashing */
return TCL_OK;
return TCL_ERROR;
}
#endif
Expand All @@ -1130,6 +1134,8 @@ static int setlisten(Tcl_Interp *irp, char *ip, char *portp, char *type, char *m
inet_ntop(AF_INET, &dcc[idx].sockname.addr.s4.sin_addr, newip, sizeof newip),
" on this machine, remove it (using listen [ip] <port> off) "
"before trying to bind to all interfaces.", NULL);
if (do_restart == -2) /* do not exit eggdrop when rehashing */
return TCL_OK;
return TCL_ERROR;
}
}
Expand All @@ -1140,6 +1146,8 @@ static int setlisten(Tcl_Interp *irp, char *ip, char *portp, char *type, char *m
inet_ntop(AF_INET6, &dcc[idx].sockname.addr.s6.sin6_addr, newip, sizeof newip),
" on this machine, remove it (using listen [ip] <port> off) "
"before trying to bind to all interfaces", NULL);
if (do_restart == -2) /* do not exit eggdrop when rehashing */
return TCL_OK;
return TCL_ERROR;
}
#endif
Expand Down

0 comments on commit 6a5948b

Please sign in to comment.