Urs Janßen | 1 Dec 2009 15:27

[tin 1.9.x] new snapshots

I've made new snapshots including the LIST ACTIVE/LIST NEWSGROUPS
optimizations with '-n' when connected to an RFC 3977 server. tin
will now use LIST COUNTS instead of LIST ACTIVE + GROUP whenever that
is advertized by the server (a patch for inn exists). also included is
a fix for the buggy SIGPIPE handling (debian bug #557528, and while
beeing on degian bugs, it also fixes the feature request #541472 but
that was already in the last snapshot). and another bugfix: the
reference threading had a bug, now sorting within the thread should
work propperly.

ftp://ftp.tin.org/pub/news/clients/tin/unstable/snapshots/

urs
--

-- 
Jef Poskanzer:
"When people aren't stupid Usenet is even more useful. Too bad this happens
 so rarely."

Urs Janßen | 9 Dec 2009 17:30

BUG REPORT tin 1.9.5 release 20091201 ("Rieclachan") [UNIX]

Version: tin 1.9.5 release 20091201 ("Rieclachan") Dec  1 2009 16:15:29
Platform:
	OS-Name  = "linux-gnu"
Compiler:
	CC       = "gcc"
	CFLAGS   = "-g -Os -Wextra -pipe -pedantic -Wall -Winline -Wshadow -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Wbad-function-cast -Wnested-externs -Wcast-align
-Wpointer-arith -Waggregate-return -Wcast-qual -Wwrite-strings -Wundef -Wpacked -Wfloat-equal
-Wendif-labels -Wunused-macros -Wdeclaration-after-statement -Wold-style-definition"
	CPP      = "gcc -E"
	CPPFLAGS = "-D_GNU_SOURCE"
Linker and Libraries:
	LD       = "gcc"
	LDFLAGS  = "-g"
	LIBS     = "-lncursesw    -lgsasl -luu -lidn -licuuc"
	PCRE     = "7.0 18-Dec-2006"
Characteristics:
	+DEBUG +NNTP_ONLY -NO_POSTING -BROKEN_LISTGROUP +XHDR_XREF
	-HAVE_FASCIST_NEWSADMIN +ENABLE_IPV6 +HAVE_COREFILE
	-NO_SHELL_ESCAPE -DISABLE_PRINTING -DONT_HAVE_PIPING -NO_ETIQUETTE
	+HAVE_LONG_FILE_NAMES +APPEND_PID +HAVE_MH_MAIL_HANDLING
	+HAVE_ISPELL +HAVE_METAMAIL +HAVE_SUM
	+HAVE_COLOR +HAVE_PGP -HAVE_PGPK -HAVE_GPG
	+MIME_BREAK_LONG_LINES +MIME_STRICT_CHARSET +CHARSET_CONVERSION
	+MULTIBYTE_ABLE -NO_LOCALE
	+USE_CANLOCK -EVIL_INSIDE -FORGERY -TINC_DNS -ENFORCE_RFC1034
	-REQUIRE_BRACKETS_IN_DOMAIN_LITERAL -FOLLOW_USEFOR_DRAFT
BOX1 : Linux 2.6.24-24-generic (i686)
CFG1 : active=1800, arts=1200, reread=3600, nntp_xover=XOVER
CFG2 : debug=0, threading=3
(Continue reading)

Urs Janßen | 9 Dec 2009 21:08

[PATCH] tin 1.9.x entered wrong group on startup

if there are new groups on the server and a cmd.-line group was given
tin entered the first new group instead of the cmd.-line group on
startup. the following patch should fix this.

=== modified file 'include/proto.h'
--- include/proto.h	2009-12-01 15:16:55 +0000
+++ include/proto.h	2009-12-09 19:54:02 +0000
 <at>  <at>  -54,6 +54,7  <at>  <at> 
 /* active.c */
 extern char group_flag(char ch);
 extern int find_newnews_index(const char *cur_newnews_host);
+extern int read_news_active_file(void);
 extern t_bool match_group_list(const char *group, const char *group_list);
 extern t_bool parse_active_line(char *line, long *max, long *min, char *moderated);
 extern t_bool process_bogus(char *name);
 <at>  <at>  -61,7 +62,6  <at>  <at> 
 extern t_bool resync_active_file(void);
 extern void create_save_active_file(void);
 extern void load_newnews_info(char *info);
-extern void read_news_active_file(void);

 /* art.c */
 extern int global_get_multipart_info(int aindex, MultiPartInfo *setme);

=== modified file 'src/active.c'
--- src/active.c	2009-12-01 15:16:55 +0000
+++ src/active.c	2009-12-09 19:58:36 +0000
 <at>  <at>  -65,9 +65,9  <at>  <at> 
  */
 static FILE *open_newgroups_fp(int idx);
(Continue reading)

Dennis Preiser | 10 Dec 2009 20:34
Picon
Picon

Re: BUG REPORT tin 1.9.5 release 20091201 ("Rieclachan") [UNIX]

On 09.12.2009, at 17:30, Urs Janßen wrote:

> tin crashes when viewing  
> <20091209094737.27612d65 <at> bellgrove.remarqs.net>
> in news.software.readers while building the page header (inside the  
> References).

[...]

> the headers of mentioned article:

> References: <Xns9CA3A96A4BB43emteedee <at> 188.40.43.213>
> 	<hc7782$nd1$8 <at> aioe.org>
> 	<20091027174636.10139eae <at> bellgrove.remarqs.net>
> 	<hce863$edt$1 <at> aioe.org>
> 	<20091102160354.3c3bb9bf <at> bellgrove.remarqs.net>

In cook.c:(w)expand_ctrl_chars() we resize the buffer too late. At  
least one expanded TAB (+ \0) should fit into the remaining space.

Another issue: If an header exceeds LEN (1024) after expanding, only  
the first 1024 chars are visible. cook.c:cook_article() uses LEN in  
put_cooked(). The patch below changes this too (use the real length).

diff -urp tin-1.9.5/src/cook.c tin-1.9.5_r1/src/cook.c
--- tin-1.9.5/src/cook.c	2009-12-01 15:15:28.000000000 +0100
+++ tin-1.9.5_r1/src/cook.c	2009-12-10 19:57:34.000000000 +0100
 <at>  <at>  -111,7 +111,7  <at>  <at>  expand_ctrl_chars(

  	c = (unsigned char *) *line;
(Continue reading)

Urs Janßen | 10 Dec 2009 21:58

Re: BUG REPORT tin 1.9.5 release 20091201 ("Rieclachan") [UNIX]

On Thu, Dec 10, 2009 at 08:34:02PM +0100, Dennis Preiser wrote:
> Last but not least a question: in cook.c:(w)expand_ctrl_chars() we use 
> the following code to compute j:
>
> | if (*wc == '\n')
> | 	ln = i + 1;
> | if (*wc == '\t') {		/* expand_tabs */
> | 	j = i + lcook_width - ((i - ln) % lcook_width);
> | 	for (; i < j; i++)
> | 		wbuf[i] = ' ';
>
> This gives wrong results when a line contains several TABs (but no  
> newlines).
>
> I think it is sufficient to use only j = i + lcook_width here (no need 
> for ln), but I'm not entirely shure whether this breaks anything else or 
> not.

the logic behind this was:

abcdefghi\t12\nfoo\tbar
         ^
i = 10, lcook_width = 8

with j = i + lcook_width the result woulod be 18, but 18 is no tabstop,
next tabstop would be i + 8 - i % 8 = 16, as linenbreaks can occur at any
position (i.e. at 20 after \t expansion in the above example if I did the
math right) we have to 'reset' the tabposcounter to zero after \n, so the
tabstop calculation restarts at line pos 0 (in the new line) and not at 20
(in the 'old' line).
(Continue reading)

Dennis Preiser | 17 Dec 2009 23:25
Picon
Picon

[PATCH] tin hangs after network connection went down

Hello,

I encountered the following issue: after the network connection went  
down (i.e.: unplug the cable), tin hangs infinitely after trying to  
read the next article or enter a group (NNTP related actions). This  
happens because s_gets() in nntplib.c:get_server() blocks.

Attached a possible fix. It uses alarm() in get_server() to start  
(and stop) a timer and installs a signal handler for SIGALRM in  
signal.c which does a tin_done(NNTP_ERROR_EXIT). The "if 0'ed"  
NNTP_READ_TIMEOUT from nntplib.h is (re)used to define the timeout.

Open issue:
I'm not sure whether alarm() is available on all platforms. I guess  
alarm() is available when SIGALRM is defined, but I'm not sure.

Dennis

Attachment (20091217.diff.gz): application/x-gzip, 1176 bytes
Urs Janßen | 19 Dec 2009 16:02

Re: [PATCH] tin hangs after network connection went down

On Thu, Dec 17, 2009 at 11:25:52PM +0100, Dennis Preiser wrote:
> Attached a possible fix. It uses alarm() in get_server() to start (and 
> stop) a timer and installs a signal handler for SIGALRM in signal.c which 
> does a tin_done(NNTP_ERROR_EXIT). The "if 0'ed" NNTP_READ_TIMEOUT from 
> nntplib.h is (re)used to define the timeout.
>
> Open issue:
> I'm not sure whether alarm() is available on all platforms. I guess  
> alarm() is available when SIGALRM is defined, but I'm not sure.

I've added a configure check for alarm() and replaced the ifdef SIGALRMs
with if defined(HAVE_ALARM) && defined(SIGALRM).

urs
--

-- 
"Only whimps use tape backup: _real_ men just upload their important stuff
 on ftp, and let the rest of the world mirror it ;)" - Linus

Urs Janßen | 24 Dec 2009 11:05

[ANNOUNCE] tin 1.9.5 released

I've just released tin 1.9.5 which, if everything goes well,
should be the last 1.x.er release.

<ftp://ftp.tin.org/pub/news/clients/tin/v1.9/tin-1.9.5.tar.gz>
<ftp://ftp.tin.org/pub/news/clients/tin/v1.9/tin-1.9.5.tar.bz2>
<ftp://ftp.tin.org/pub/news/clients/tin/v1.9/tin-1.9.5.tar.lzma>

-- 1.9.5 release 20091224 "Lochruan" --

U019) Urs Janssen <urs <at> tin.org>
      ADD. MarkFeedRead ^X / MarkFeedUnread ^Y to thread-level
      ADD. configure check for gethostbyname in libnetwork (Haiku)
      ADD. check if SIGBUS == SIGSEGV (Haiku)
      ADD. don't define HAVE_LINK on Haiku
      ADD. config.guess, config.sub update
      FIX. help.c, keymap.c, signal.c, thread.c, extern.h, tin.1, tin.5
           configure.in, aclocal.m4, config.guess, config.sub

U018) Frederic Briere <fbriere <at> fbriere.net>
      ADD. MarkFeedRead ^X / MarkFeedUnread ^W to page-level
      FIX. feed.c, group.c, help.c, keymap.c, lang.c, extern.h, keymap.h, tin.h

U017) Joe Hansen <joedalton2 <at> yahoo.dk>
      ADD. initial danish translation
      FIX. da.po

U016) Volker Borchert <v.borchert <at> vistecprivat.de>
      BUG. used towupper() in the !MULTIBYTE_ABLE case
      ADD. fallback for missing sys_errlist declaration
      FIX. prompt.c, string.c, pcre/Makefile[.in]
(Continue reading)

Urs Janßen | 29 Dec 2009 18:08
Favicon

(fwd) tin crashes on MacOS 10.4

----- Forwarded message from Dennis Grevenstein <dennis.grevenstein <at> gmail.com> -----

MacOS 10.6.2
i386-apple-darwin10.2.0
gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)

and

MacOS X 10.4.11
Xcode 2.5
gcc version 4.0.1 (Apple Computer, Inc. build 5370)

sh-3.2# ./tin.dSYM
tin 1.9.4 release 20090211 ("Rieclachan") [UNIX] (c) Copyright
1991-2009 Iain Lea.
Connecting to 192.168.2.1...
tin.dSYM: signal handler caught SIGSEGV signal (11).
tin.dSYM 1.9.4 20090211 ("Rieclachan") [UNIX]: send a DETAILED bug
report to tin-bugs <at> tin.org
Abort trap
(gdb) run
Starting program: /private/var/root/tin-1.9.4/src/tin.dSYM
Reading symbols for shared libraries ++++. done
tin 1.9.4 release 20090211 ("Rieclachan") [UNIX] (c) Copyright
1991-2009 Iain Lea.
Connecting to 192.168.2.1...
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x000000010004234f in nntp_open () at ./nntplib.c:447
447			def.h_addr_list[0] = (char *) &defaddr;
(Continue reading)

Dennis Preiser | 29 Dec 2009 18:56
Picon
Picon

Re: (fwd) tin crashes on MacOS 10.4

On Tue, Dec 29, 2009 at 06:08:09PM +0100, Urs Janßen wrote:

[crash with MacOS X]

I can confirm this for

> MacOS X 10.4.11
> Xcode 2.5
> gcc version 4.0.1 (Apple Computer, Inc. build 5370)

tin 1.9.4 and 1.9.5 crashes when using an ip-address (-g ip-address).

> IIRC we didn't change the related code or years, anyone willing to look at
> this?

Can anyone reproduce this behavior (crash when using -g ip-address) with
platforms other than MacOS X?

Dennis


Gmane