--- loncom/lond 2010/06/25 04:37:44 1.445 +++ loncom/lond 2010/07/17 19:14:35 1.446 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.445 2010/06/25 04:37:44 raeburn Exp $ +# $Id: lond,v 1.446 2010/07/17 19:14:35 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -58,7 +58,7 @@ my $DEBUG = 0; # Non zero to ena my $status=''; my $lastlog=''; -my $VERSION='$Revision: 1.445 $'; #' stupid emacs +my $VERSION='$Revision: 1.446 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -3127,11 +3127,16 @@ sub dump_with_regexp { my $count=0; while (my ($key,$value) = each(%$hashref)) { if ($namespace eq 'roles') { - if ($key =~ /^($LONCAPA::match_domain)_($LONCAPA::match_community)_(cc|co|in|ta|ep|ad|st|cr)/) { - if ($clientversion =~ /^(\d+)\.(\d+)$/) { + if ($key =~ m{^/($LONCAPA::match_domain)/($LONCAPA::match_community)_(cc|co|in|ta|ep|ad|st|cr)}) { + my $cdom = $1; + my $cnum = $2; + if ($clientversion =~ /^['"]?(\d+)\.(\d+)[.\d\-]+['"]?$/) { my $major = $1; my $minor = $2; next if (($major < 2) || (($major == 2) && ($minor < 9))); + } else { + my $homeserver = &Apache::lonnet::homeserver($cnum,$cdom); + next unless ($currenthostid eq $homeserver); } } }