Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, April 19, 2024

Diff for sendxmpp/sendxmpp between version 1.9 and 1.10

version 1.9, 2007/03/03 15:35:44 version 1.10, 2007/03/04 00:49:24
Line 16  if 0; # not running under some shell
Line 16  if 0; # not running under some shell
 # Released under the terms of the GNU General Public License v2  # Released under the terms of the GNU General Public License v2
 #  #
   
   use Authen::SASL qw(Perl);
 use Net::XMPP;  use Net::XMPP;
 use Getopt::Long;  use Getopt::Long;
 use strict;  use strict;
Line 400  sub xmpp_logout($) {
Line 401  sub xmpp_logout($) {
 # xmpp_check_result: check the return value from some xmpp function execution  # xmpp_check_result: check the return value from some xmpp function execution
 # input: text, result, [connection]  # input: text, result, [connection]
 #  #
 sub xmpp_check_result {  sub xmpp_check_result
   {
     my ($txt,$res,$cnx)=@_;      my ($txt, $res, $cnx)=@_;
   
     error_exit ("Error '$txt': result undefined")      error_exit ("Error '$txt': result undefined")
         unless (defined $res);          unless (defined $res);
   
     # res may be 0      # res may be 0
     if ($res == 0) {          if ($res == 0) {
         debug_print "$txt";                  debug_print "$txt";
     # result can be true or 'ok'                  # result can be true or 'ok'
     } elsif ((@$res == 1 && $$res[0]) || $$res[0] eq 'ok') {          }
         debug_print "$txt: " .  $$res[0];          elsif ((@$res == 1 && $$res[0]) || $$res[0] eq 'ok') {
     # otherwise, there is some error                  debug_print "$txt: " .  $$res[0];
     } else {                  # otherwise, there is some error
         my $errmsg = $cnx->GetErrorCode() || '?';          }
         error_exit ("Error '$txt': " . join (': ',@$res) . "[$errmsg]", $cnx);          else {
     }                  my $errmsg = $cnx->GetErrorCode() || '?';
                   error_exit ("Error '$txt': " . join (': ',@$res) . "[$errmsg]", $cnx);
           }
 }  }
   
   

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top