--- loncom/lonnet/perl/lonnet.pm 2005/10/18 21:29:35 1.666 +++ loncom/lonnet/perl/lonnet.pm 2005/10/25 19:14:33 1.667 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.666 2005/10/18 21:29:35 albertel Exp $ +# $Id: lonnet.pm,v 1.667 2005/10/25 19:14:33 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2955,6 +2955,29 @@ sub eget { return %returnhash; } +# ------------------------------------------------------------ tmpput interface +sub tmpput { + my ($storehash,$server)=@_; + my $items=''; + foreach (keys(%$storehash)) { + $items.=&escape($_).'='.&freeze_escape($$storehash{$_}).'&'; + } + $items=~s/\&$//; + return &reply("tmpput:$items",$server); +} + +# ------------------------------------------------------------ tmpget interface +sub tmpget { + my ($token)=@_; + my $rep=&reply("tmpget:$token",$perlvar{'lonHostID'}); + my %returnhash; + foreach my $item (split(/\&/,$rep)) { + my ($key,$value)=split(/=/,$item); + $returnhash{&unescape($key)}=&thaw_unescape($value); + } + return %returnhash; +} + # ---------------------------------------------- Custom access rule evaluation sub customaccess {