--- loncom/lonnet/perl/lonnet.pm 2022/02/06 21:37:07 1.1480 +++ loncom/lonnet/perl/lonnet.pm 2022/02/14 02:48:53 1.1481 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.1480 2022/02/06 21:37:07 raeburn Exp $ +# $Id: lonnet.pm,v 1.1481 2022/02/14 02:48:53 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2261,6 +2261,26 @@ sub del_dom { } } } + +sub store_dom { + my ($storehash,$id,$namespace,$dom,$home) = @_; + $$storehash{'ip'}=&get_requestor_ip(); + $$storehash{'host'}=$perlvar{'lonHostID'}; + my $namevalue=''; + foreach my $key (keys(%{$storehash})) { + $namevalue.=&escape($key).'='.&freeze_escape($$storehash{$key}).'&'; + } + $namevalue=~s/\&$//; + if (grep { $_ eq $home } current_machine_ids()) { + return LONCAPA::Lond::store_dom("storedom:$dom:$namespace:$id:$namevalue"); + } else { + if ($namespace eq 'private') { + return 'refused'; + } else { + return reply("storedom:$dom:$namespace:$id:$namevalue","$home"); + } + } +} # ----------------------------------construct domainconfig user for a domain sub get_domainconfiguser {