inews.c patch
Matus "fantomas" Uhlar
uhlar at fantomas.sk
Mon Apr 3 17:19:42 UTC 2000
Hello,
inews default post to localhost, port 119 (hardcoded).
this little patch changes it a little:
inews posts to port defined in inn.conf;
If there's nntpposthost defined, innd connects exactly to it. and its port.
another idea: port for posting could be detected (always) from
1. innconf->nnrpdpostport
2. innconf->port
3. NNTP_PORT
independant on other settings (of course when posting through unix domain
socket,m the port wouldn't bbe used)
...comments ?
--- inews.c.orig Wed Nov 24 22:02:15 1999
+++ inews.c Mon Apr 3 18:28:12 2000
@@ -1299,7 +1299,11 @@
}
/* Try to open a connection to the server. */
- if (NNTPremoteopen(NNTP_PORT, &FromServer, &ToServer, buff) < 0) {
+ if ( (innconf->nnrpdposthost == NULL)
+ ? (NNTPremoteopen(innconf->port, &FromServer, &ToServer, buff))
+ : (NNTPconnect(innconf->nnrpdposthost, innconf->nnrpdpostport,
&FromServer, &ToServer, buff))
+ < 0) {
+
Spooling = TRUE;
if ((p = strchr(buff, '\n')) != NULL)
*p = '\0';
--
Matus "fantomas" Uhlar, sysadmin at NEXTRA, Slovakia; IRCNET admin of *.sk
uhlar at fantomas.sk ; http://www.fantomas.sk/ ; http://www.nextra.sk/
"The box said 'Requires Windows 95 or better', so I bought a Macintosh".
More information about the inn-workers
mailing list