--- loncom/lond 2006/01/31 16:12:12 1.313 +++ loncom/lond 2006/02/01 22:08:48 1.316 @@ -2,7 +2,7 @@ # The LearningOnline Network # lond "LON Daemon" Server (port "LOND" 5663) # -# $Id: lond,v 1.313 2006/01/31 16:12:12 albertel Exp $ +# $Id: lond,v 1.316 2006/02/01 22:08:48 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -61,7 +61,7 @@ my $status=''; my $lastlog=''; my $lond_max_wait_time = 13; -my $VERSION='$Revision: 1.313 $'; #' stupid emacs +my $VERSION='$Revision: 1.316 $'; #' stupid emacs my $remoteVERSION; my $currenthostid="default"; my $currentdomainid; @@ -1074,10 +1074,8 @@ sub _do_hash_untie { die(); } - &logthis("$$ for $namespace"); $sym=&Symbol::gensym(); open($sym,"$file_prefix.db"); - &logthis("$$ for $namespace attempt lock"); my $failed=0; eval { local $SIG{__DIE__}='DEFAULT'; @@ -1090,11 +1088,9 @@ sub _do_hash_untie { alarm(0); }; if ($failed) { - &logthis("$$ for $namespace got failed lock"); $! = 100; # throwing error # 100 return undef; } - &logthis("$$ for $file_prefix.db got lock"); return &_do_hash_tie($file_prefix,$namespace,$how,$loghead,$what); } @@ -2455,7 +2451,7 @@ sub put_user_profile_entry { $userinput); } } else { - &Failure( $client, "error: ".($!)." tie(GDBM) Failed ". + &Failure( $client, "error: ".($!+0)." tie(GDBM) Failed ". "while attempting put\n", $userinput); } } else { @@ -2491,7 +2487,7 @@ sub newput_user_profile_entry { my $hashref = &tie_user_hash($udom, $uname, $namespace, &GDBM_WRCREAT(),"N",$what); if(!$hashref) { - &Failure( $client, "error: ".($!)." tie(GDBM) Failed ". + &Failure( $client, "error: ".($!+0)." tie(GDBM) Failed ". "while attempting put\n", $userinput); return 1; } @@ -2681,7 +2677,7 @@ sub roles_delete_handler { foreach my $key (@rolekeys) { delete $hashref->{$key}; } - if (&untie_user_hash(%$hashref)) { + if (&untie_user_hash($hashref)) { &Reply($client, "ok\n", $userinput); } else { &Failure( $client, "error: ".($!+0)." untie(GDBM) Failed ". @@ -2822,7 +2818,7 @@ sub delete_profile_entry { foreach my $key (@keys) { delete($hashref->{$key}); } - if (&untie_user_hash(%$hashref)) { + if (&untie_user_hash($hashref)) { &Reply($client, "ok\n", $userinput); } else { &Failure($client, "error: ".($!+0)." untie(GDBM) Failed ". @@ -2864,7 +2860,7 @@ sub get_profile_keys { foreach my $key (keys %$hashref) { $qresult.="$key&"; } - if (&untie_user_hash(%$hashref)) { + if (&untie_user_hash($hashref)) { $qresult=~s/\&$//; &Reply($client, "$qresult\n", $userinput); } else {