--- loncom/lonnet/perl/lonnet.pm 2005/04/18 21:19:53 1.626 +++ loncom/lonnet/perl/lonnet.pm 2005/04/18 22:28:19 1.627 @@ -1,7 +1,7 @@ # The LearningOnline Network # TCP networking package # -# $Id: lonnet.pm,v 1.626 2005/04/18 21:19:53 albertel Exp $ +# $Id: lonnet.pm,v 1.627 2005/04/18 22:28:19 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2561,10 +2561,16 @@ sub convert_dump_to_currentdump{ return \%returnhash; } +# ------------------------------------------------------ critical inc interface + +sub cinc { + return &inc(@_,'critical'); +} + # --------------------------------------------------------------- inc interface sub inc { - my ($namespace,$store,$udomain,$uname) = @_; + my ($namespace,$store,$udomain,$uname,$critical) = @_; if (!$udomain) { $udomain=$env{'user.domain'}; } if (!$uname) { $uname=$env{'user.name'}; } my $uhome=&homeserver($uname,$udomain); @@ -2582,7 +2588,11 @@ sub inc { } } $items=~s/\&$//; - return &reply("inc:$udomain:$uname:$namespace:$items",$uhome); + if ($critical) { + return &critical("inc:$udomain:$uname:$namespace:$items",$uhome); + } else { + return &reply("inc:$udomain:$uname:$namespace:$items",$uhome); + } } # --------------------------------------------------------------- put interface @@ -2639,21 +2649,6 @@ sub cput { return &critical("put:$udomain:$uname:$namespace:$items",$uhome); } -# ------------------------------------------------------ critical inc interface - -sub cinc { - my ($namespace,$storehash,$udomain,$uname)=@_; - if (!$udomain) { $udomain=$env{'user.domain'}; } - if (!$uname) { $uname=$env{'user.name'}; } - my $uhome=&homeserver($uname,$udomain); - my $items=''; - foreach (keys %$storehash) { - $items.=escape($_).'='.&freeze_escape($$storehash{$_}).'&'; - } - $items=~s/\&$//; - return &critical("inc:$udomain:$uname:$namespace:$items",$uhome); -} - # -------------------------------------------------------------- eget interface sub eget {