anchor.diff:  	    Res
       end.
   
  +%%--------------------------------------------------------------------
  +%% Function: lookup_mail2uid(Mail)
  +%%           Mail = string(), e-mail address
  +%% Descrip.: Find the uid of a user that has Mail as mail-attribute in
  +%%           LDAP.
  +%% Returns : Value |
  +%%           none  |
  +%%           error
  +%%           Value = string()
  +%%--------------------------------------------------------------------
   lookup_mail2uid(Mail) ->
       case sipserver:get_env(ldap_server, none) of
   	none ->
  
positive.code: 
  
  %%--------------------------------------------------------------------
  %% Function: terminate/2
  %% Description: Shutdown the server
  %% Returns: any (ignored by gen_server)
  %%--------------------------------------------------------------------
  terminate(Reason, State) ->
      case Reason of
  
negative.code: 	       [Server, Type, In, Attribute]),
      error.
  
  %%--------------------------------------------------------------------
  %% Function: ldapsearch(Server, Type, In, Attributes)
  %%           Server     = string()
  %%           Type       = string()
  %%           In         = string()
  %%           Attributes = list() of string()
  %% Descrip.: Query LDAP. Return a list of our result tuples.
  %% Returns : Result |
  %%           none   |
  %%           error
  %%           Result = list() {dn, Dn, attributes, Attributes} tuples
  %%           Dn = string(), distinguished name
  %%           Attributes = list() of {Attribute, Value} tuples
  %%--------------------------------------------------------------------
  ldapsearch(Server, Type, In, Attributes) when list(Server), list(Type), list(In), list(Attributes) ->
      logger:log(debug, "Directory: Extra debug: ldapsearch() Server ~p, Type ~p, In ~p, Attributes ~p",
  	       [Server, Type, In, Attributes]),
      query_ldapclient({search, Server, Type, In, Attributes});
  ldapsearch(Server, Type, In, Attribute) ->
      logger:log(error, "Directory: ldapsearch() called with illegal argument(s) :~nServer ~p, Type ~p, In ~p, Attribute ~p",
  	       [Server, Type, In, Attribute]),
  