--- loncom/lonnet/perl/lonnet.pm 2016/08/31 21:50:42 1.1319 +++ loncom/lonnet/perl/lonnet.pm 2016/09/21 04:47:57 1.1322 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1319 2016/08/31 21:50:42 damieng Exp $ +# $Id: lonnet.pm,v 1.1322 2016/09/21 04:47:57 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2242,7 +2242,8 @@ sub get_domain_defaults { 'requestcourses','inststatus', 'coursedefaults','usersessions', 'requestauthor','selfenrollment', - 'coursecategories','ssl','autoenroll'],$domain); + 'coursecategories','ssl','autoenroll', + 'trust'],$domain); my @coursetypes = ('official','unofficial','community','textbook','placement'); if (ref($domconfig{'defaults'}) eq 'HASH') { $domdefaults{'lang_def'} = $domconfig{'defaults'}{'lang_def'}; @@ -2376,6 +2377,14 @@ sub get_domain_defaults { $domdefaults{'connect'} = $domconfig{'ssl'}{'connect'}; } } + if (ref($domconfig{'trust'}) eq 'HASH') { + my @prefixes = qw(content shared enroll othcoau coaurem domroles catalog reqcrs msg); + foreach my $prefix (@prefixes) { + if (ref($domconfig{'trust'}{$prefix}) eq 'HASH') { + $domdefaults{'trust'.$prefix} = $domconfig{'trust'}{$prefix}; + } + } + } if (ref($domconfig{'autoenroll'}) eq 'HASH') { $domdefaults{'autofailsafe'} = $domconfig{'autoenroll'}{'autofailsafe'}; } @@ -7911,7 +7920,7 @@ sub fetch_enrollment_query { &logthis('fetch_enrollment_query error: '.$reply.' for '.$dom.' '.$env{'user.name'}.' for '.$queryid.' context: '.$context.' '.$cnum.' maxtries: '.$maxtries.' tries: '.$tries); } else { my @responses = split(/:/,$reply); - if ($homeserver eq $perlvar{'lonHostID'}) { + if (grep { $_ eq $homeserver } ¤t_machine_ids()) { foreach my $line (@responses) { my ($key,$value) = split(/=/,$line,2); $$replyref{$key} = $value;