Subj : jamnntpd issues, smapinntpd To : Oli From : Nil Alexandrov Date : Thu Jan 02 2020 23:23:34 Hello, Oli! Thursday January 02 2020 17:18, from Oli -> Nil Alexandrov: NA>> * Socket reuse (just one line fix, otherwise you need NA>> to wait a few mins after restart). Ol> and i wondered why jamnntpd never restarts immediately ... Here is my patch for you. $ git diff diff --git a/src/main.c b/src/main.c index 6aaded8..df160f0 100644 -+- a/src/main.c +++ b/src/main.c @@ -460,6 +460,17 @@ int main(int argc, char **argv) exit(10); } + int enable = 1; + if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) < 0) + { + uchar err[200]; + + os_showerror("Failed to reuse address/port: %s",os_strerr(os_errno(),err,200)); + os_free(); + freeargs(); + exit(10); + } + memset(&local, 0, sizeof(local) ); local.sin_family = AF_INET; Ol> please, keep jamnntpd independent from the husky project, which is a Ol> mess ... Though, Husky project is alive and is constantly being patched by some 2:R50 SysOps. Best Regards, Nil --- GoldED+/LNX 1.1.5 * Origin: -=NIL BBS=- (2:5015/46) .