[LON-CAPA-cvs] cvs: loncom / lond /lonnet/perl lonnet.pm

albertel lon-capa-cvs@mail.lon-capa.org
Fri, 14 Oct 2005 19:08:42 -0000


albertel		Fri Oct 14 15:08:42 2005 EDT

  Modified files:              
    /loncom	lond 
    /loncom/lonnet/perl	lonnet.pm 
  Log:
  - escape the indiviual senders
  - remove some unneeded code
  
  
Index: loncom/lond
diff -u loncom/lond:1.299 loncom/lond:1.300
--- loncom/lond:1.299	Tue Oct 11 17:29:36 2005
+++ loncom/lond	Fri Oct 14 15:08:31 2005
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.299 2005/10/11 21:29:36 raeburn Exp $
+# $Id: lond,v 1.300 2005/10/14 19:08:31 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -59,7 +59,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.299 $'; #' stupid emacs
+my $VERSION='$Revision: 1.300 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -3586,11 +3586,7 @@
     }
     if (defined($sendersfilter)) {
         $sendersfilter=&unescape($sendersfilter);
-        if ($sendersfilter =~ /\&/) {
-            @senders = split(/\&/,$sendersfilter);
-        } else {
-            $senders[0] = $sendersfilter;
-        }
+	@senders = map { &unescape($_) } split(/\&/,$sendersfilter);
     }
 
     my $qresult='';
@@ -3721,11 +3717,7 @@
     }
     if (defined($rolesfilter)) {
         $rolesfilter=&unescape($rolesfilter);
-        if ($rolesfilter =~ /\&/) {
-            @roles = split(/\&/,$rolesfilter);
-        } else {
-            $roles[0] = $rolesfilter;
-        }
+	@roles = split(/\&/,$rolesfilter);
     }
                                                                                            
     my $hashref = &tie_domain_hash($udom, "nohist_domainroles", &GDBM_WRCREAT());
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.663 loncom/lonnet/perl/lonnet.pm:1.664
--- loncom/lonnet/perl/lonnet.pm:1.663	Wed Oct 12 12:50:37 2005
+++ loncom/lonnet/perl/lonnet.pm	Fri Oct 14 15:08:42 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # TCP networking package
 #
-# $Id: lonnet.pm,v 1.663 2005/10/12 16:50:37 raeburn Exp $
+# $Id: lonnet.pm,v 1.664 2005/10/14 19:08:42 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1862,10 +1862,11 @@
     foreach my $tryserver (keys(%libserv)) {
         if ($hostdom{$tryserver} eq $dom) {
             %{$returnhash{$tryserver}}=();
-            foreach (
-                split(/\&/,&reply('dcmaildump:'.$dom.':'.
-                   &escape($startdate).':'.&escape($enddate).':'.
-                   &escape($senders), $tryserver))) {
+	    my $cmd='dcmaildump:'.$dom.':'.
+		&escape($startdate).':'.&escape($enddate).':';
+	    my @esc_senders=map { &escape($_)} @$senders;
+	    $cmd.=&escape(join('&',@esc_senders));
+	    foreach (split(/\&/,&reply($cmd,$tryserver))) {
                 my ($key,$value) = split(/\=/,$_);
                 if (($key) && ($value)) {
                     $returnhash{$tryserver}{&unescape($key)} = &unescape($value);