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

List:       swatch-users
Subject:    Swatch-users digest, Vol 1 #102 - 1 msg
From:       swatch-users-request () ucsb ! edu
Date:       2001-10-11 19:10:04
[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 bug-report (Olivier Poitrey)

--__--__--

Message: 1
Date: Thu, 11 Oct 2001 17:45:25 +0200
From: Olivier Poitrey <rs-web@rhapsodyk.net>
To: swatch-users@ucsb.edu
Subject: [Swatch-users] Swatch bug-report

Hello,

I've tried to contact the swatch author for a bug report, but haven't got
any reply. So I forward it to this list.

I think that throttle option is buggy too. Had somebody success to use it ?

Is this project still alive ?

thx

----- Forwarded message from Olivier Poitrey <Olivier@Pas-tres.net> -----

Date: Wed, 10 Oct 2001 13:52:37 +0200
From: Olivier Poitrey <Olivier@Pas-tres.net>
To: todd.atkins@ucsb.edu
Subject: Swatch bug-report

Hello,

I've try you script and I love it. But a bug in the 3.0.2 and last snapshot
(20010522) prevent me to use it with the "mail" action.

My configuration file was :

watchfor /patern/
    mail address=user1@domain:user2@domain,subject=my subject
    
and --dump-script got this :

 if (/patern/) {
        send_email(' ADDRESSES' => "user1@domain:user2@domain", 'MESSAGE' => "$_", \
'SUBJECT' => "my subject", );  next;
 }    
 
Be aware of the space between ' and A of ADDRESS. This made swath to ignore
my parameters and to send mail to default adresse who is the user that lauch
the script.

After a little investigation in the source, I found the bug, its in the
"read_config" function. At line 532 (from swatch snapshot 20010522), you
can see this line :

($val = substr($_, length($key))) =~ s/^\s*=\s*//;

You have to replace by this one :

($val = substr($_, length($key))) =~ s/^\s*=\s*|^\s+//;


The problem come from your following test :

if (/\s*=\s*/) {

that search for action constructed like

        echo=random
        
but it also match

        mail addresses=email...
        

hope that help, and thanx for this great script :)

best regards

PS: sorry for my poor english

-- 
___________________________________________________________________________
 O  l  i  v  i  e  r    P  o  i  t  r  e  y

----- End forwarded message -----
----- Forwarded message from Olivier Poitrey <Olivier@Pas-tres.net> -----

Date: Wed, 10 Oct 2001 13:59:11 +0200
From: Olivier Poitrey <Olivier@Pas-tres.net>
To: todd.atkins@ucsb.edu
Subject: Swatch another bugreport

Re,

I just find another bug in the same action. With "mail" action, when you
spécify an email adresse with an @, it isn't quoted.

I think you have to add this line 

$val =~ s/@/\\@/g;

at line 1248 of the same snapshot as my preceding mail.

here is the patch for my 2 bugreports :

532c532
<       ($val = substr($_, length($key))) =~ s/^\s*=\s*//;
---
> ($val = substr($_, length($key))) =~ s/^\s*=\s*|^\s+//;
1247a1248
> $val =~ s/@/\\@/g;

best regards

-- 
___________________________________________________________________________
 O  l  i  v  i  e  r    P  o  i  t  r  e  y

----- End forwarded message -----

-- 
___________________________________________________________________________
 O  l  i  v  i  e  r    P  o  i  t  r  e  y



--__--__--

_______________________________________________
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