--- loncom/lonnet/perl/lonnet.pm 2006/10/27 21:54:40 1.800 +++ loncom/lonnet/perl/lonnet.pm 2006/11/15 14:35:10 1.804 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.800 2006/10/27 21:54:40 albertel Exp $ +# $Id: lonnet.pm,v 1.804 2006/11/15 14:35:10 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -3219,12 +3219,15 @@ sub eget { # ------------------------------------------------------------ tmpput interface sub tmpput { - my ($storehash,$server)=@_; + my ($storehash,$server,$context)=@_; my $items=''; foreach my $item (keys(%$storehash)) { $items.=&escape($item).'='.&freeze_escape($$storehash{$item}).'&'; } $items=~s/\&$//; + if (defined($context)) { + $items .= ':'.&escape($context); + } return &reply("tmpput:$items",$server); } @@ -4296,8 +4299,8 @@ sub auto_instcode_defaults { $returnhash->{&unescape($name)}=&unescape($value); } } + $ok_response = 1; } - $ok_response = 1; } if ($ok_response) { return 'ok'; @@ -6604,6 +6607,7 @@ sub rndseed { if (!$domain) { $domain=$wdomain; } if (!$username) { $username=$wusername } my $which=&get_rand_alg(); + if (defined(&getCODE())) { if ($which eq '64bit5') { return &rndseed_CODE_64bit5($symb,$courseid,$domain,$username); @@ -6661,7 +6665,6 @@ sub rndseed_64bit { #&logthis("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); #&logthis("rndseed :$num:$symb"); if ($_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); } - if ($_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); } return "$num1,$num2"; } } @@ -6684,6 +6687,7 @@ sub rndseed_64bit2 { my $num2=$nameseed+$domainseed+$courseseed; #&logthis("$symbseed:$nameseed;$domainseed|$courseseed;$namechck:$symbchck"); #&logthis("rndseed :$num:$symb"); + if ($_64bit) { $num1=(($num1<<32)>>32); $num2=(($num2<<32)>>32); } return "$num1,$num2"; } } @@ -7236,7 +7240,7 @@ BEGIN { while (my $line = <$fh>) { next if ($line =~ /^(\#|\s*$)/); # next if /^\#/; - chomp; + chomp $line; my ($domain, $domain_description, $def_auth, $def_auth_arg, $def_lang, $city, $longi, $lati, $primary) = split(/:/,$line,9); $domain_auth_def{$domain}=$def_auth;