Article View: news.software.readers
Article #41135Re: More slrn questions...
From: Stephane Gibier
Date: Sun, 24 May 1998 00:00
Date: Sun, 24 May 1998 00:00
83 lines
2837 bytes
2837 bytes
On 22 May 1998 21:07:30 GMT,
John E. Davis <davis@space.mit.edu> wrote:
> The article that I am currently following up to has a message id of
> <6k4b38$eh8$1@nntp2.ba.best.com>. Normally slrn will generate a
> message-id based upon the posting host as determined by the
> `gethostname' system call. Perhaps your system is not properly
> configured causing this system call to fail.
I have sent you a report about this problem in the case of the Win32
version. The Microsoft Winsock interface is not properly initialized
during the main initialization process, so the gethostname will return
-1 and the generate_message_id will not work. Have you received my
patch ?
I post it :
=====================================================================
--- slrn0.9.5.2/src/slrn.c Sun May 03 22:06:20 1998
+++ slrn/src/slrn.c Tue May 12 12:41:35 1998
@@ -92,6 +92,17 @@
# include <windows.h>
#endif
+#if defined(__NT__)
+# include <winsock.h>
+# define USE_WINSOCK_SLTCP 1
+#else
+# if defined(__MINGW32__)
+# define Win32_Winsock
+# include <windows.h>
+# define USE_WINSOCK_SLTCP 1
+# endif
+#endif
+
/*}}}*/
/*{{{ Global Variables */
@@ -113,6 +124,10 @@
int Slrn_Default_Server_Obj = SLRN_DEFAULT_SERVER_OBJ;
int Slrn_Default_Post_Obj = SLRN_DEFAULT_POST_OBJ;
+#if defined(USE_WINSOCK_SLTCP)
+WSADATA Slrn_wsaData;
+#endif
+
/*}}}*/
/*{{{ Static Variables */
@@ -812,6 +827,11 @@
#endif
lock_file (0);
+
+#if defined(USE_WINSOCK_SLTCP)
+ /* Clean up winsock when program exits. */
+ WSACleanup ();
+#endif
}
void slrn_quit (int retcode) /*{{{*/
@@ -1168,6 +1188,11 @@
#if SLRN_HAS_SLANG
if (-1 == slrn_init_slang ())
fprintf (stderr, "Error initializing S-Lang interpreter.\n");
+#endif
+
+#if USE_WINSOCK_SLTCP
+ if (WSAStartup(MAKEWORD(1,1), &Slrn_wsaData) != 0)
+ fprintf (stderr, "Error initializing winsock.\n");
#endif
slrn_startup_initialize ();
=====================================================================
I am currently using this patch and Message-ID are now correctly
generated on the Win32 version. So I am able to score followups.
Hope this helps.
Technical Details
Message-ID:
<slrn6mfjsl.4p.sgibier@hermes.wanadoo.fr>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<6k4b38$eh8$1@nntp2.ba.best.com> <slrn6mbq87.ie2.davis@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrn6mfjsl.4p.sgibier@hermes.wanadoo.fr> Subject: Re: More slrn questions... Date: Sun, 24 May 1998 00:00:00 +0000 From: sgibier@mail.dotcom.fr (Stephane Gibier) References: <6k4b38$eh8$1@nntp2.ba.best.com> <slrn6mbq87.ie2.davis@aluche.mit.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 356013719 Mail-Copies-To: never Organization: Le club des 5 Newsgroups: news.software.readers