TIP: Click on subject to list as thread! ANSI
echo: jamnntpd
to: OLI
from: NIL ALEXANDROV
date: 2020-01-02 23:20:00
subject: jamnntpd issues, smapinnt

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)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.