Skip to Content.
Sympa Menu

en - [sympa-users] Bug in sympa_soap_client.pl (Sympa 6.2.4)

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Steve Shipway <address@concealed>
  • To: "address@concealed" <address@concealed>
  • Subject: [sympa-users] Bug in sympa_soap_client.pl (Sympa 6.2.4)
  • Date: Wed, 14 Oct 2015 23:12:45 +0000

The Sympa SOAP call ‘getDetails’ returns the subscriber details in a HASH, rather than an ARRAY of hashes as the ‘info’ call does.  This is perfectly valid SOAP format, but…

 

However the sympa_soap_client.pl utility only checks for a result type of ARRAY or SCALAR.  Hashes are reported as ‘Pb HASH(0xxxxxxxxx)’.

 

Two ways to fix this –

1.       Make the getDetails call return a single-valued array holding the hashref.  This is easily done in the SOAP.pm but would break compatibility.

2.       Fix sympa_soap_client.pl to correctly handle HASH return values.  This is my preferred option as it preserves compatibility, and fixes the thing that’s broken rather than removing the thing that tickles the bug.

 

At line 301 in sympa_soap_client.pl, add the HASH test to set $ret[0] to be the hashref.

 

        if (ref( $r->result) =~ /^ARRAY/) {

            @ret = @{$r->result};

        }elsif (ref( $r->result) =~ /^HASH/) {

            @ret = ( $r->result );

        }elsif (ref $r->result) {

            print "Pb ".($r->result)."\n";

            return undef;

        }else {

           @ret = $r->result;

        }

        &tools::dump_var(\@ret, 0, \*STDOUT);

 

Logged in the tracker as bug #10053 https://sourcesup.renater.fr/tracker/index.php?func=detail&aid=10053&group_id=23&atid=167

Thanks to Alexander Bech for pointing out the problem so I could track it down.

 

Steve

 

Steve Shipway

Unix Design Team Lead

The University of Auckland

T: +64 9 3737 599 ext 86487

E: address@concealed

(GNU Terry Pratchett)

 

Attachment: smime.p7s
Description: S/MIME cryptographic signature



  • [sympa-users] Bug in sympa_soap_client.pl (Sympa 6.2.4), Steve Shipway, 10/14/2015

Archive powered by MHonArc 2.6.19+.

Top of Page