/** * Commits modification made to the proxy configuration. **/ int linphone_proxy_config_done(LinphoneProxyConfig *obj) { if (!linphone_proxy_config_check(obj->lc,obj)) return -1; obj->commit=TRUE; linphone_proxy_config_write_all_to_config_file(obj->lc); return 0; }
/** * Add a proxy configuration. * This will start registration on the proxy, if registration is enabled. **/ int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){ if (!linphone_proxy_config_check(lc,cfg)) { return -1; } if (ms_list_find(lc->sip_conf.proxies,cfg)!=NULL){ ms_warning("ProxyConfig already entered, ignored."); return 0; } lc->sip_conf.proxies=ms_list_append(lc->sip_conf.proxies,(void *)cfg); linphone_proxy_config_apply(cfg,lc); return 0; }
int linphone_proxy_config_done(LinphoneProxyConfig *obj) { const char *id_str; if (!linphone_proxy_config_check(obj->lc,obj)) return -1; if (obj->reg_identity!=NULL) id_str=obj->reg_identity; else id_str=linphone_core_get_primary_contact(obj->lc); obj->frozen=FALSE; if (obj->reg_sendregister){ char *ct=NULL; osip_message_t *msg=NULL; obj->rid=eXosip_register_build_initial_register(id_str,obj->reg_proxy,NULL,obj->expires,&msg); eXosip_register_send_register(obj->rid,msg); if (ct!=NULL) osip_free(ct); } return 0; }