Re: Retrieving subscriber list and transaction logs isn't working for ezmlm-idx-6.0.0...
Bruce Guenter <[email protected]> Fri, 28 Sep 2007 12:43:51 -0600
| Newsgroups | gmane.mail.ezmlm |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Sep 25, 2007 at 11:53:51AM -0600, Jeff Ross wrote: > From the looks of it, ezmlm is sending the log to a user of the name of the > first line in the log. OK, I've nailed this down. The following patch fixes at least one test case that seems to apply to your circumstances, and should likely fix more. Please let me know how it works for you. -- Bruce Guenter <[email protected]> http://untroubled.org/ I do custom software development. Email me for details. Index: sub-std.c =================================================================== --- sub-std.c (revision 680) +++ sub-std.c (working copy) @@ -33,7 +33,6 @@ static stralloc addr = {0}; static stralloc lcaddr = {0}; -static stralloc line = {0}; static stralloc fn = {0}; static stralloc fnnew = {0}; static stralloc fnlock = {0}; @@ -104,6 +103,7 @@ const char *subdir, const char *userhost) { + static stralloc line = {0}; int fd; unsigned int j; @@ -200,6 +200,7 @@ unsigned long hash_hi, int subwrite()) /* write function. */ { + static stralloc line = {0}; unsigned int i; int fd; @@ -237,17 +238,17 @@ (void)info; } -static void lineout(int subwrite()) +static void lineout(const stralloc *line, int subwrite()) { struct datetime dt; char date[DATE822FMT]; - (void) scan_ulong(line.s,&when); + (void) scan_ulong(line->s,&when); datetime_tai(&dt,when); /* there is always at least a '\n' */ if (!stralloc_copyb(&outline,date,date822fmt(date,&dt) - 1)) die_nomem(); if (!stralloc_cats(&outline,": ")) die_nomem(); - if (!stralloc_catb(&outline,line.s,line.len - 1)) die_nomem(); + if (!stralloc_catb(&outline,line->s,line->len - 1)) die_nomem(); if (subwrite(outline.s,outline.len) == -1) strerr_die3x(111,FATAL,ERR_WRITE,"output"); return; @@ -261,6 +262,7 @@ char *search, /* search string */ int subwrite()) /* output fxn */ { + static stralloc line = {0}; unsigned char x; unsigned char y; @@ -297,7 +299,7 @@ strerr_die2sys(111,FATAL,ERR_READ_INPUT); if (!match) break; if (!searchlen) { - lineout(subwrite); + lineout(&line,subwrite); } else { /* simple case-insensitive search */ cpline = (unsigned char *) line.s - 1; cplast = cpline + line.len - searchlen; /* line has \0 at the end */ @@ -311,7 +313,7 @@ if (x != y && x != '_') break; /* '_' = wildcard */ } if (!x) { - lineout(subwrite); + lineout(&line,subwrite); break; } } @@ -344,6 +346,8 @@ const char *event, int forcehash) { + static stralloc line = {0}; + int fdlock; unsigned int j;
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFG/Utn6W+y3GmZgOgRAhuqAJ9DY8rq64CJ4VnW22wYN7sigexE2wCfUTFC +TCtLXWdGVRb37k+PSXredg= =Jc66 -----END PGP SIGNATURE-----