[prev in list] [next in list] [prev in thread] [next in thread] 

List:       swatch-users
Subject:    Swatch-users digest, Vol 1 #115 - 1 msg
From:       swatch-users-request () ucsb ! edu
Date:       2001-11-05 20:05:03
[Download RAW message or body]

Send Swatch-users mailing list submissions to
	swatch-users@ucsb.edu

To subscribe or unsubscribe via the World Wide Web, visit
	http://ucsb.edu/mailman/listinfo/swatch-users
or, via email, send a message with subject or body 'help' to
	swatch-users-request@ucsb.edu

You can reach the person managing the list at
	swatch-users-admin@ucsb.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Swatch-users digest..."


Today's Topics:

   1. Swatch throttle bug-report (Martin Jones)

--__--__--

Message: 1
Date: Fri, 2 Nov 2001 09:07:36 +0000 (GMT)
From: Martin Jones <mlj@sabreit.demon.co.uk>
To: swatch-users@ucsb.edu
cc: rs-web@rhapsodyk.net
Subject: [Swatch-users] Swatch throttle bug-report


Hi - I too have been experiencing problems with the throttle function, and
have found what I belive to be the root of the problem.

The problem affects trottle rules which do not use 'use=regex' and is
present in both 3.0.2 and 3.0.3 (the only two versions I have tested.)

First: my fix: for swatch as shipped in 3.03
----------
996c996
<             CUT_MARK   => 16,
---
>             CUT_MARKS  => [ "0:16" ],
1025c1025,1026
<     $key = substr($msg, $opts{'CUT_MARK'});
---
>     my ($begin, $end) = split(/:/, $opts{'CUT_MARKS'});
>     $key = substr($msg, $begin, $end);
----------

As the code currently stands the 'my ($begin, $end) = split(/:/,
$opts{'CUT_MARKS'})' line sets both $begin and $end to null, and thus $key
is also set to null.

So if you have several throttle rules using 'use=message' (the default)
they all map to the same key, so the first line matching a throttle
use=message rule is reported, after which all other lines matching _any_
throttle use=message rule will be added to the count for the first
encountered message until the timeout associated with the matched
rule is exceeded, after which everything starts again.

I changed this so that $key is the line lacking the timestamp (assuming
the timestamp is the first 16 characters)

I'm not completely convinced that this is exactly what was intended, but
it does appear to work for me.

Hope this helps,

	Martin.

-- 
------------------------------------------------------------------------------
Dr Martin L Jones
E-mail: mlj@sabreit.demon.co.uk




--__--__--

_______________________________________________
Swatch-users mailing list
Swatch-users@ucsb.edu
http://ucsb.edu/mailman/listinfo/swatch-users


End of Swatch-users Digest

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic