Changeset 804:28c330b38010 in mediastreamer2


Ignore:
Timestamp:
Dec 18, 2009 2:51:06 PM (3 years ago)
Author:
smorlat <smorlat@…>
Branch:
default
Message:

update buddylookup to use LinphoneAddress?

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@792 3f6dc0c8-ddfe-455d-9043-3cd528dc4637

File:
1 edited

Legend:

Unmodified
Added
Removed
  • linphone/coreapi/plugins/buddylookup/src/lookup.c

    r770 r804  
    196196        LinphoneAuthInfo *aa; 
    197197        SoupMessage *sm; 
    198  
     198        LinphoneAddress *from; 
     199         
    199200        if (url==NULL){ 
    200201                ms_error("No url defined for BuddyLookup in config file, aborting search."); 
     
    202203        } 
    203204 
    204         osip_from_t *from; 
    205         osip_from_init(&from); 
    206         if (osip_from_parse(from,identity)!=0){ 
    207                 osip_from_free(from); 
     205        from=linphone_address_new(identity); 
     206        if (from==NULL){ 
    208207                ms_error("Could not parse identity %s",identity); 
    209208                return -1; 
    210209        } 
    211         aa=linphone_core_find_auth_info(lc,from->url->host,from->url->username); 
     210        aa=linphone_core_find_auth_info(lc,linphone_address_get_domain(from),linphone_address_get_username(from)); 
    212211        if (aa) ms_message("There is a password: %s",aa->passwd); 
    213         else ms_message("No password for %s on %s",from->url->username,from->url->host); 
    214         sm=build_xmlrpc_request(identity, aa ? aa->passwd : NULL, req->base.key, from->url->host, url, req->base.max_results); 
    215         osip_from_free(from); 
     212        else ms_message("No password for %s on %s",linphone_address_get_username(from),linphone_address_get_domain(from)); 
     213        sm=build_xmlrpc_request(identity, aa ? aa->passwd : NULL, req->base.key, linphone_address_get_domain(from), url, req->base.max_results); 
     214        linphone_address_destroy(from); 
    216215        req->msg=sm; 
    217216        ortp_thread_create(&req->th,NULL,process_xml_rpc_request,req); 
Note: See TracChangeset for help on using the changeset viewer.