Diff for /loncom/lond between versions 1.313 and 1.315

version 1.313, 2006/01/31 16:12:12 version 1.315, 2006/01/31 21:54:34
Line 1074  sub _do_hash_untie { Line 1074  sub _do_hash_untie {
     die();      die();
  }   }
           
  &logthis("$$ for $namespace");  
  $sym=&Symbol::gensym();   $sym=&Symbol::gensym();
  open($sym,"$file_prefix.db");   open($sym,"$file_prefix.db");
  &logthis("$$ for $namespace attempt lock");  
  my $failed=0;   my $failed=0;
  eval {   eval {
     local $SIG{__DIE__}='DEFAULT';      local $SIG{__DIE__}='DEFAULT';
Line 1090  sub _do_hash_untie { Line 1088  sub _do_hash_untie {
     alarm(0);      alarm(0);
  };   };
  if ($failed) {   if ($failed) {
     &logthis("$$ for $namespace got failed lock");  
     $! = 100; # throwing error # 100      $! = 100; # throwing error # 100
     return undef;      return undef;
  }   }
  &logthis("$$ for $file_prefix.db got lock");  
  return &_do_hash_tie($file_prefix,$namespace,$how,$loghead,$what);   return &_do_hash_tie($file_prefix,$namespace,$how,$loghead,$what);
     }      }
   
Line 2681  sub roles_delete_handler { Line 2677  sub roles_delete_handler {
  foreach my $key (@rolekeys) {   foreach my $key (@rolekeys) {
     delete $hashref->{$key};      delete $hashref->{$key};
  }   }
  if (&untie_user_hash(%$hashref)) {   if (&untie_user_hash($hashref)) {
     &Reply($client, "ok\n", $userinput);      &Reply($client, "ok\n", $userinput);
  } else {   } else {
     &Failure( $client, "error: ".($!+0)." untie(GDBM) Failed ".      &Failure( $client, "error: ".($!+0)." untie(GDBM) Failed ".
Line 2822  sub delete_profile_entry { Line 2818  sub delete_profile_entry {
  foreach my $key (@keys) {   foreach my $key (@keys) {
     delete($hashref->{$key});      delete($hashref->{$key});
  }   }
  if (&untie_user_hash(%$hashref)) {   if (&untie_user_hash($hashref)) {
     &Reply($client, "ok\n", $userinput);      &Reply($client, "ok\n", $userinput);
  } else {   } else {
     &Failure($client, "error: ".($!+0)." untie(GDBM) Failed ".      &Failure($client, "error: ".($!+0)." untie(GDBM) Failed ".
Line 2864  sub get_profile_keys { Line 2860  sub get_profile_keys {
  foreach my $key (keys %$hashref) {   foreach my $key (keys %$hashref) {
     $qresult.="$key&";      $qresult.="$key&";
  }   }
  if (&untie_user_hash(%$hashref)) {   if (&untie_user_hash($hashref)) {
     $qresult=~s/\&$//;      $qresult=~s/\&$//;
     &Reply($client, "$qresult\n", $userinput);      &Reply($client, "$qresult\n", $userinput);
  } else {   } else {

Removed from v.1.313  
changed lines
  Added in v.1.315


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>