Diff for /loncom/lond between versions 1.500 and 1.501

version 1.500, 2013/04/11 14:59:29 version 1.501, 2013/07/25 19:11:07
Line 4466  sub get_id_handler { Line 4466  sub get_id_handler {
 }  }
 &register_handler("idget", \&get_id_handler, 0, 1, 0);  &register_handler("idget", \&get_id_handler, 0, 1, 0);
   
   #   Deletes one or more ids in a domain's id database.
   #
   #   Parameters:
   #       $cmd                  - Command keyword (iddel).
   #       $tail                 - Command tail.  In this case a colon
   #                               separated list containing:
   #                               The domain for which we are deleting the id(s).
   #                               &-separated list of id(s) to delete.
   #       $client               - File open on client socket.
   # Returns:
   #     1   - Continue processing
   #     0   - Exit server.
   #     
   #
   
   sub del_id_handler {
       my ($cmd,$tail,$client) = @_;
   
       my $userinput = "$cmd:$tail";
   
       my ($udom,$what)=split(/:/,$tail);
       chomp($what);
       my $hashref = &tie_domain_hash($udom, "ids", &GDBM_WRCREAT(),
                                      "D", $what);
       if ($hashref) {
           my @keys=split(/\&/,$what);
           foreach my $key (@keys) {
               delete($hashref->{$key});
           }
           if (&untie_user_hash($hashref)) {
               &Reply($client, "ok\n", $userinput);
           } else {
               &Failure($client, "error: ".($!+0)." untie(GDBM) Failed ".
                       "while attempting iddel\n", $userinput);
           }
       } else {
           &Failure( $client, "error: ".($!+0)." tie(GDBM) Failed ".
                    "while attempting iddel\n", $userinput);
       }
       return 1;
   }
   &register_handler("iddel", \&del_id_handler, 0, 1, 0);
   
 #  #
 # Puts broadcast e-mail sent by Domain Coordinator in nohist_dcmail database   # Puts broadcast e-mail sent by Domain Coordinator in nohist_dcmail database 
 #  #

Removed from v.1.500  
changed lines
  Added in v.1.501


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