mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix most common warnings
This commit is contained in:
parent
5805d4b106
commit
656ff43b13
50 changed files with 222 additions and 209 deletions
|
|
@ -597,7 +597,7 @@ lpc_cmd_call(LinphoneCore *lc, char *args)
|
|||
{
|
||||
snprintf(callee_name,sizeof(callee_name),"%s",args);
|
||||
}
|
||||
linphone_call_params_destroy(cp);
|
||||
linphone_call_params_unref(cp);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -1981,7 +1981,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){
|
|||
if ((from=linphone_address_new(identity))!=NULL){
|
||||
info=linphone_auth_info_new(linphone_address_get_username(from),NULL,passwd,NULL,NULL,linphone_address_get_username(from));
|
||||
linphone_core_add_auth_info(lc,info);
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
linphone_auth_info_destroy(info);
|
||||
}
|
||||
}
|
||||
|
|
@ -2574,7 +2574,7 @@ static int lpc_cmd_camera(LinphoneCore *lc, char *args){
|
|||
LinphoneCallParams *ncp=linphone_call_params_copy(cp);
|
||||
linphone_call_params_enable_video(ncp,TRUE);
|
||||
linphone_core_update_call(lc,call,ncp);
|
||||
linphone_call_params_destroy (ncp);
|
||||
linphone_call_params_unref (ncp);
|
||||
linphonec_out("Trying to bring up video stream...\n");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ static void linphonec_call_state_changed(LinphoneCore *lc, LinphoneCall *call, L
|
|||
linphone_call_params_enable_early_media_sending(callparams, TRUE);
|
||||
if (vcap_enabled) linphone_call_params_enable_video(callparams, TRUE);
|
||||
linphone_core_accept_early_media_with_params(lc, call, callparams);
|
||||
linphone_call_params_destroy(callparams);
|
||||
linphone_call_params_unref(callparams);
|
||||
}
|
||||
break;
|
||||
case LinphoneCallOutgoingInit:
|
||||
|
|
@ -796,7 +796,7 @@ linphonec_finish(int exit_status)
|
|||
stop_pipe_reader();
|
||||
#endif /*_WIN32_WCE*/
|
||||
|
||||
linphone_core_destroy (linphonec);
|
||||
linphone_core_unref (linphonec);
|
||||
|
||||
if (mylogfile != NULL && mylogfile != stdout)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ static char* _get_identity(const LinphoneAccountCreator *creator) {
|
|||
addr = linphone_proxy_config_normalize_sip_uri(proxy, creator->username ? creator->username : creator->phone_number);
|
||||
|
||||
identity = linphone_address_as_string(addr);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
linphone_proxy_config_destroy(proxy);
|
||||
}
|
||||
return identity;
|
||||
|
|
@ -550,7 +550,7 @@ LinphoneProxyConfig * linphone_account_creator_configure(const LinphoneAccountCr
|
|||
linphone_proxy_config_set_server_addr(cfg, tmp);
|
||||
linphone_proxy_config_set_route(cfg, tmp);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
linphone_core_set_stun_server(creator->core, "stun.linphone.org");
|
||||
linphone_core_set_firewall_policy(creator->core, LinphonePolicyUseIce);
|
||||
|
|
@ -564,7 +564,7 @@ LinphoneProxyConfig * linphone_account_creator_configure(const LinphoneAccountCr
|
|||
linphone_address_get_domain(identity) // domain
|
||||
);
|
||||
linphone_core_add_auth_info(creator->core, info);
|
||||
linphone_address_destroy(identity);
|
||||
linphone_address_unref(identity);
|
||||
|
||||
if (linphone_core_add_proxy_config(creator->core, cfg) != -1) {
|
||||
linphone_core_set_default_proxy(creator->core, cfg);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ bool_t linphone_address_equal(const LinphoneAddress *a1, const LinphoneAddress *
|
|||
}
|
||||
|
||||
void linphone_address_destroy(LinphoneAddress *u){
|
||||
sal_address_unref(u);
|
||||
linphone_address_unref(u);
|
||||
}
|
||||
|
||||
void linphone_address_set_password(LinphoneAddress *addr, const char *passwd){
|
||||
|
|
|
|||
|
|
@ -281,8 +281,8 @@ void linphone_call_log_unref(LinphoneCallLog *cl) {
|
|||
******************************************************************************/
|
||||
|
||||
static void _linphone_call_log_destroy(LinphoneCallLog *cl) {
|
||||
if (cl->from!=NULL) linphone_address_destroy(cl->from);
|
||||
if (cl->to!=NULL) linphone_address_destroy(cl->to);
|
||||
if (cl->from!=NULL) linphone_address_unref(cl->from);
|
||||
if (cl->to!=NULL) linphone_address_unref(cl->to);
|
||||
if (cl->refkey!=NULL) ms_free(cl->refkey);
|
||||
if (cl->call_id) ms_free(cl->call_id);
|
||||
if (cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]!=NULL) linphone_reporting_destroy(cl->reporting.reports[LINPHONE_CALL_STATS_AUDIO]);
|
||||
|
|
@ -454,10 +454,10 @@ static int create_call_log(void *data, int argc, char **argv, char **colName) {
|
|||
|
||||
error:
|
||||
if (from){
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
}
|
||||
if (to){
|
||||
linphone_address_destroy(to);
|
||||
linphone_address_unref(to);
|
||||
}
|
||||
ms_error("Bad call log at storage_id %u", storage_id);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ bool_t linphone_call_params_video_multicast_enabled(const LinphoneCallParams *pa
|
|||
* Constructor and destructor functions *
|
||||
******************************************************************************/
|
||||
|
||||
static void _linphone_call_params_destroy(LinphoneCallParams *cp){
|
||||
static void _linphone_call_params_unref(LinphoneCallParams *cp){
|
||||
unsigned int i;
|
||||
if (cp->record_file) ms_free(cp->record_file);
|
||||
if (cp->custom_headers) sal_custom_header_free(cp->custom_headers);
|
||||
|
|
@ -368,7 +368,7 @@ void linphone_call_params_destroy(LinphoneCallParams *cp) {
|
|||
BELLE_SIP_DECLARE_NO_IMPLEMENTED_INTERFACES(LinphoneCallParams);
|
||||
|
||||
BELLE_SIP_INSTANCIATE_VPTR(LinphoneCallParams, belle_sip_object_t,
|
||||
(belle_sip_object_destroy_t)_linphone_call_params_destroy,
|
||||
(belle_sip_object_destroy_t)_linphone_call_params_unref,
|
||||
NULL, // clone
|
||||
NULL, // marshal
|
||||
FALSE
|
||||
|
|
|
|||
|
|
@ -334,13 +334,13 @@ static void call_received(SalOp *h){
|
|||
ms_warning("Receiving a call while one with same address [%s] is initiated, refusing this one with busy message.",addr);
|
||||
sal_call_decline(h,SalReasonBusy,NULL);
|
||||
sal_op_release(h);
|
||||
linphone_address_destroy(from_addr);
|
||||
linphone_address_destroy(to_addr);
|
||||
linphone_address_destroy(from_address_to_search_if_me);
|
||||
linphone_address_unref(from_addr);
|
||||
linphone_address_unref(to_addr);
|
||||
linphone_address_unref(from_address_to_search_if_me);
|
||||
ms_free(addr);
|
||||
return;
|
||||
} else if (from_address_to_search_if_me) {
|
||||
linphone_address_destroy(from_address_to_search_if_me);
|
||||
linphone_address_unref(from_address_to_search_if_me);
|
||||
}
|
||||
|
||||
call=linphone_call_new_incoming(lc,from_addr,to_addr,h);
|
||||
|
|
@ -748,7 +748,7 @@ static void call_updating(SalOp *op, bool_t is_update){
|
|||
LinphoneCallParams *p=linphone_core_create_call_params(lc, NULL);
|
||||
ms_message("Applying default policy for offering SDP on call [%p]",call);
|
||||
linphone_call_set_new_params(call, p);
|
||||
linphone_call_params_destroy(p);
|
||||
linphone_call_params_unref(p);
|
||||
}
|
||||
linphone_call_make_local_media_description(call);
|
||||
sal_call_set_local_media_description(call->op,call->localdesc);
|
||||
|
|
@ -1127,7 +1127,7 @@ static void refer_received(Sal *sal, SalOp *op, const char *referto){
|
|||
if(refer_to_addr) {
|
||||
const char *tmp = linphone_address_get_method_param(refer_to_addr);
|
||||
if(tmp) strncpy(method, tmp, sizeof(method));
|
||||
linphone_address_destroy(refer_to_addr);
|
||||
linphone_address_unref(refer_to_addr);
|
||||
}
|
||||
if (call && (strlen(method) == 0 || strcmp(method, "INVITE") == 0)) {
|
||||
if (call->refer_to!=NULL){
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ static void _linphone_chat_room_destroy(LinphoneChatRoom *cr) {
|
|||
cr->lc->chatrooms = bctbx_list_remove(cr->lc->chatrooms, cr);
|
||||
}
|
||||
}
|
||||
linphone_address_destroy(cr->peer_url);
|
||||
linphone_address_unref(cr->peer_url);
|
||||
if (cr->pending_message)
|
||||
linphone_chat_message_destroy(cr->pending_message);
|
||||
ms_free(cr->peer);
|
||||
|
|
@ -243,7 +243,7 @@ static LinphoneChatRoom *_linphone_core_get_or_create_chat_room(LinphoneCore *lc
|
|||
return NULL;
|
||||
}
|
||||
ret = _linphone_core_get_chat_room(lc, to_addr);
|
||||
linphone_address_destroy(to_addr);
|
||||
linphone_address_unref(to_addr);
|
||||
if (!ret) {
|
||||
ret = _linphone_core_create_chat_room_from_url(lc, to);
|
||||
}
|
||||
|
|
@ -405,7 +405,7 @@ void _linphone_chat_room_send_message(LinphoneChatRoom *cr, LinphoneChatMessage
|
|||
* BUG
|
||||
* the file transfer message constructor sets the from, but doesn't do it as well as here.
|
||||
*/
|
||||
linphone_address_destroy(msg->from);
|
||||
linphone_address_unref(msg->from);
|
||||
}
|
||||
msg->from = linphone_address_new(identity);
|
||||
|
||||
|
|
@ -660,7 +660,7 @@ LinphoneReason linphone_core_message_received(LinphoneCore *lc, SalOp *op, const
|
|||
linphone_chat_room_message_received(cr, lc, msg);
|
||||
|
||||
end:
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
linphone_chat_message_unref(msg);
|
||||
return reason;
|
||||
}
|
||||
|
|
@ -769,7 +769,7 @@ LinphoneReason linphone_core_is_composing_received(LinphoneCore *lc, SalOp *op,
|
|||
}
|
||||
linphone_chat_message_unref(msg);
|
||||
}
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
|
||||
return reason;
|
||||
}
|
||||
|
|
@ -864,7 +864,7 @@ LinphoneReason linphone_core_imdn_received(LinphoneCore *lc, SalOp *op, const Sa
|
|||
if (cr != NULL) {
|
||||
linphone_chat_room_notify_imdn(cr, imdn->content);
|
||||
}
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
return LinphoneReasonNone;
|
||||
}
|
||||
|
||||
|
|
@ -1030,8 +1030,8 @@ static void linphone_chat_room_send_is_composing_notification(LinphoneChatRoom *
|
|||
}
|
||||
|
||||
linphone_chat_message_unref(msg);
|
||||
linphone_address_destroy(from_addr);
|
||||
linphone_address_destroy(to_addr);
|
||||
linphone_address_unref(from_addr);
|
||||
linphone_address_unref(to_addr);
|
||||
ms_free(content);
|
||||
sal_op_unref(op);
|
||||
}
|
||||
|
|
@ -1182,8 +1182,8 @@ static void linphone_chat_message_send_imdn(LinphoneChatMessage *cm, enum ImdnTy
|
|||
}
|
||||
|
||||
linphone_chat_message_unref(msg);
|
||||
linphone_address_destroy(from_addr);
|
||||
linphone_address_destroy(to_addr);
|
||||
linphone_address_unref(from_addr);
|
||||
linphone_address_unref(to_addr);
|
||||
ms_free(content);
|
||||
}
|
||||
sal_op_unref(op);
|
||||
|
|
@ -1259,7 +1259,7 @@ void linphone_core_real_time_text_received(LinphoneCore *lc, LinphoneChatRoom *c
|
|||
|
||||
linphone_chat_message_set_from(msg, cr->peer_url);
|
||||
if (msg->to)
|
||||
linphone_address_destroy(msg->to);
|
||||
linphone_address_unref(msg->to);
|
||||
msg->to = call->dest_proxy ? linphone_address_clone(call->dest_proxy->identity_address) :
|
||||
linphone_address_new(linphone_core_get_identity(lc));
|
||||
msg->time = ms_time(0);
|
||||
|
|
@ -1319,7 +1319,7 @@ int linphone_chat_message_put_char(LinphoneChatMessage *msg, uint32_t character)
|
|||
msg->time = ms_time(0);
|
||||
msg->state = LinphoneChatMessageStateDisplayed;
|
||||
msg->dir = LinphoneChatMessageOutgoing;
|
||||
if (msg->from) linphone_address_destroy(msg->from);
|
||||
if (msg->from) linphone_address_unref(msg->from);
|
||||
msg->from = linphone_address_new(linphone_core_get_identity(lc));
|
||||
msg->storage_id = linphone_chat_message_store(msg);
|
||||
ms_free(msg->message);
|
||||
|
|
@ -1441,7 +1441,7 @@ void linphone_chat_message_set_appdata(LinphoneChatMessage *msg, const char *dat
|
|||
|
||||
void linphone_chat_message_set_from_address(LinphoneChatMessage *msg, const LinphoneAddress *from) {
|
||||
if (msg->from)
|
||||
linphone_address_destroy(msg->from);
|
||||
linphone_address_unref(msg->from);
|
||||
msg->from = linphone_address_clone(from);
|
||||
}
|
||||
|
||||
|
|
@ -1451,7 +1451,7 @@ const LinphoneAddress *linphone_chat_message_get_from_address(const LinphoneChat
|
|||
|
||||
void linphone_chat_message_set_to_address(LinphoneChatMessage *msg, const LinphoneAddress *to) {
|
||||
if (msg->to)
|
||||
linphone_address_destroy(msg->to);
|
||||
linphone_address_unref(msg->to);
|
||||
msg->to = linphone_address_clone(to);
|
||||
}
|
||||
|
||||
|
|
@ -1552,9 +1552,9 @@ static void _linphone_chat_message_destroy(LinphoneChatMessage *msg) {
|
|||
if (msg->appdata)
|
||||
ms_free(msg->appdata);
|
||||
if (msg->from)
|
||||
linphone_address_destroy(msg->from);
|
||||
linphone_address_unref(msg->from);
|
||||
if (msg->to)
|
||||
linphone_address_destroy(msg->to);
|
||||
linphone_address_unref(msg->to);
|
||||
if (msg->message_id)
|
||||
ms_free(msg->message_id);
|
||||
if (msg->custom_headers)
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ int LocalConference::addParticipant(LinphoneCall *call) {
|
|||
/*this will trigger a reINVITE that will later redraw the streams */
|
||||
/*FIXME probably a bit too much to just redraw streams !*/
|
||||
linphone_core_update_call(m_core,call,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
addLocalEndpoint();
|
||||
}else{
|
||||
ms_error("Call is in state %s, it cannot be added to the conference.",linphone_call_state_to_string(call->state));
|
||||
|
|
@ -441,7 +441,7 @@ int LocalConference::removeFromConference(LinphoneCall *call, bool_t active){
|
|||
}
|
||||
ms_message("Updating call to actually remove from conference");
|
||||
err=linphone_core_update_call(m_core,call,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
} else{
|
||||
ms_message("Pausing call to actually remove from conference");
|
||||
err=_linphone_core_pause_call(m_core,call);
|
||||
|
|
|
|||
|
|
@ -54,6 +54,13 @@ LinphoneFactory *linphone_factory_get(void) {
|
|||
return _factory;
|
||||
}
|
||||
|
||||
void linphone_factory_clean(void){
|
||||
if (_factory){
|
||||
belle_sip_object_unref(_factory);
|
||||
_factory = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
LinphoneCore *linphone_factory_create_core(const LinphoneFactory *factory, LinphoneCoreCbs *cbs,
|
||||
const char *config_path, const char *factory_config_path) {
|
||||
LpConfig *config = lp_config_new_with_factory(config_path, factory_config_path);
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ const char * linphone_friend_list_get_rls_uri(const LinphoneFriendList *list) {
|
|||
void linphone_friend_list_set_rls_uri(LinphoneFriendList *list, const char *rls_uri) {
|
||||
LinphoneAddress *addr = rls_uri ? linphone_core_create_address(list->lc, rls_uri) : NULL;
|
||||
linphone_friend_list_set_rls_address(list, addr);
|
||||
if (addr) linphone_address_destroy(addr);
|
||||
if (addr) linphone_address_unref(addr);
|
||||
}
|
||||
|
||||
static LinphoneFriendListStatus _linphone_friend_list_add_friend(LinphoneFriendList *list, LinphoneFriend *lf, bool_t synchronize) {
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int main(int argc, char *argv[]){
|
|||
linphone_proxy_config_set_server_addr(proxy_cfg,linphone_address_get_domain(from)); /* we assume domain = proxy server address*/
|
||||
linphone_proxy_config_enable_register(proxy_cfg,TRUE); /*activate registration for this proxy config*/
|
||||
linphone_proxy_config_enable_publish(proxy_cfg,TRUE); /* enable presence satus publication for this proxy*/
|
||||
linphone_address_destroy(from); /*release resource*/
|
||||
linphone_address_unref(from); /*release resource*/
|
||||
|
||||
linphone_core_add_proxy_config(lc,proxy_cfg); /*add proxy config to linphone core*/
|
||||
linphone_core_set_default_proxy(lc,proxy_cfg); /*set to default proxy*/
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ int main(int argc, char *argv[]){
|
|||
server_addr = linphone_address_get_domain(from); /*extract domain address from identity*/
|
||||
linphone_proxy_config_set_server_addr(proxy_cfg,server_addr); /* we assume domain = proxy server address*/
|
||||
linphone_proxy_config_enable_register(proxy_cfg,TRUE); /*activate registration for this proxy config*/
|
||||
linphone_address_destroy(from); /*release resource*/
|
||||
linphone_address_unref(from); /*release resource*/
|
||||
|
||||
linphone_core_add_proxy_config(lc,proxy_cfg); /*add proxy config to linphone core*/
|
||||
linphone_core_set_default_proxy(lc,proxy_cfg); /*set to default proxy*/
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ int main(int argc, char *argv[]){
|
|||
LinphoneCallParams *cp = linphone_core_create_call_params(lc, NULL);
|
||||
linphone_call_params_enable_realtime_text(cp,TRUE); /*enable real time text*/
|
||||
call=linphone_core_invite_with_params(lc,dest,cp);
|
||||
linphone_call_params_destroy(cp);
|
||||
linphone_call_params_unref(cp);
|
||||
if (call==NULL){
|
||||
printf("Could not place call to %s\n",dest);
|
||||
goto end;
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ int main(int argc, char *argv[]){
|
|||
server_addr = linphone_address_get_domain(from); /*extract domain address from identity*/
|
||||
linphone_proxy_config_set_server_addr(proxy_cfg,server_addr); /* we assume domain = proxy server address*/
|
||||
linphone_proxy_config_enable_register(proxy_cfg,TRUE); /*activate registration for this proxy config*/
|
||||
linphone_address_destroy(from); /*release resource*/
|
||||
linphone_address_unref(from); /*release resource*/
|
||||
|
||||
linphone_core_add_proxy_config(lc,proxy_cfg); /*add proxy config to linphone core*/
|
||||
linphone_core_set_default_proxy(lc,proxy_cfg); /*set to default proxy*/
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ static void linphone_ldap_contact_provider_handle_search_result( LinphoneLDAPCon
|
|||
//ms_message("Added friend %s / %s", ldap_data.name, ldap_data.sip);
|
||||
ms_free(ldap_data.sip);
|
||||
ms_free(ldap_data.name);
|
||||
linphone_address_destroy(la);
|
||||
linphone_address_unref(la);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -894,7 +894,7 @@ void linphone_call_make_local_media_description(LinphoneCall *call) {
|
|||
update_media_description_from_stun(md, &call->ac, &call->vc, &call->tc);
|
||||
call->localdesc=md;
|
||||
linphone_call_update_local_media_description_from_ice_or_upnp(call);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
if (old_md){
|
||||
transfer_already_assigned_payload_types(old_md,md);
|
||||
call->localdesc_changed=sal_media_description_equals(md,old_md);
|
||||
|
|
@ -4696,7 +4696,7 @@ void linphone_call_set_contact_op(LinphoneCall* call) {
|
|||
sal_address_clean((SalAddress*)contact); /* clean out contact_params that come from proxy config*/
|
||||
sal_address_set_transport((SalAddress*)contact,tport);
|
||||
sal_op_set_contact_address(call->op, contact);
|
||||
linphone_address_destroy(contact);
|
||||
linphone_address_unref(contact);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2079,7 +2079,7 @@ int linphone_core_set_primary_contact(LinphoneCore *lc, const char *contact) {
|
|||
ms_free(lc->sip_conf.guessed_contact);
|
||||
lc->sip_conf.guessed_contact=NULL;
|
||||
}
|
||||
linphone_address_destroy(ctt);
|
||||
linphone_address_unref(ctt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2110,7 +2110,7 @@ static void update_primary_contact(LinphoneCore *lc){
|
|||
it won't work. But we prefer to return something in all cases. It at least shows username and ip address.*/
|
||||
guessed=linphone_address_as_string(url);
|
||||
lc->sip_conf.guessed_contact=guessed;
|
||||
linphone_address_destroy(url);
|
||||
linphone_address_unref(url);
|
||||
}
|
||||
|
||||
const char *linphone_core_get_primary_contact(LinphoneCore *lc){
|
||||
|
|
@ -2918,7 +2918,7 @@ LinphoneCall * linphone_core_start_refered_call(LinphoneCore *lc, LinphoneCall *
|
|||
ms_message("Starting new call to refered address %s",call->refer_to);
|
||||
call->refer_pending=FALSE;
|
||||
newcall=linphone_core_invite_with_params(lc,call->refer_to,cp);
|
||||
linphone_call_params_destroy(cp);
|
||||
linphone_call_params_unref(cp);
|
||||
if (newcall) {
|
||||
call->transfer_target=linphone_call_ref(newcall);
|
||||
linphone_core_notify_refer_state(lc,call,newcall);
|
||||
|
|
@ -3132,7 +3132,7 @@ LinphoneCall * linphone_core_invite(LinphoneCore *lc, const char *url){
|
|||
LinphoneCallParams *p=linphone_core_create_call_params(lc, NULL);
|
||||
p->has_video &= !!lc->video_policy.automatically_initiate;
|
||||
call=linphone_core_invite_with_params(lc,url,p);
|
||||
linphone_call_params_destroy(p);
|
||||
linphone_call_params_unref(p);
|
||||
return call;
|
||||
}
|
||||
|
||||
|
|
@ -3141,7 +3141,7 @@ LinphoneCall * linphone_core_invite_with_params(LinphoneCore *lc, const char *ur
|
|||
if (addr){
|
||||
LinphoneCall *call;
|
||||
call=linphone_core_invite_address_with_params(lc,addr,p);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
return call;
|
||||
}
|
||||
return NULL;
|
||||
|
|
@ -3152,7 +3152,7 @@ LinphoneCall * linphone_core_invite_address(LinphoneCore *lc, const LinphoneAddr
|
|||
LinphoneCallParams *p=linphone_core_create_call_params(lc, NULL);
|
||||
p->has_video &= !!lc->video_policy.automatically_initiate;
|
||||
call=linphone_core_invite_address_with_params (lc,addr,p);
|
||||
linphone_call_params_destroy(p);
|
||||
linphone_call_params_unref(p);
|
||||
return call;
|
||||
}
|
||||
|
||||
|
|
@ -3244,7 +3244,7 @@ LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const
|
|||
{
|
||||
ms_warning("we had a problem in adding the call into the invite ... weird");
|
||||
linphone_call_unref(call);
|
||||
linphone_call_params_destroy(cp);
|
||||
linphone_call_params_unref(cp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
@ -3294,7 +3294,7 @@ LinphoneCall * linphone_core_invite_address_with_params(LinphoneCore *lc, const
|
|||
}
|
||||
|
||||
if (real_url!=NULL) ms_free(real_url);
|
||||
linphone_call_params_destroy(cp);
|
||||
linphone_call_params_unref(cp);
|
||||
return call;
|
||||
}
|
||||
|
||||
|
|
@ -3314,7 +3314,7 @@ int linphone_core_transfer_call(LinphoneCore *lc, LinphoneCall *call, const char
|
|||
real_url=linphone_address_as_string (real_parsed_url);
|
||||
sal_call_refer(call->op,real_url);
|
||||
ms_free(real_url);
|
||||
linphone_address_destroy(real_parsed_url);
|
||||
linphone_address_unref(real_parsed_url);
|
||||
linphone_call_set_transfer_state(call, LinphoneCallOutgoingInit);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -3349,7 +3349,7 @@ void linphone_core_notify_incoming_call(LinphoneCore *lc, LinphoneCall *call){
|
|||
from_parsed=linphone_address_new(sal_op_get_from(call->op));
|
||||
linphone_address_clean(from_parsed);
|
||||
tmp=linphone_address_as_string(from_parsed);
|
||||
linphone_address_destroy(from_parsed);
|
||||
linphone_address_unref(from_parsed);
|
||||
barmesg=ortp_strdup_printf("%s %s%s",tmp,_("is contacting you"),
|
||||
(sal_call_autoanswer_asked(call->op)) ?_(" and asked autoanswer."):".");
|
||||
linphone_core_notify_show_interface(lc);
|
||||
|
|
@ -5927,7 +5927,7 @@ void sip_config_uninit(LinphoneCore *lc)
|
|||
if (config->contact)
|
||||
ms_free(config->contact);
|
||||
if (lc->default_rls_addr)
|
||||
linphone_address_destroy(lc->default_rls_addr);
|
||||
linphone_address_unref(lc->default_rls_addr);
|
||||
|
||||
linphone_im_notif_policy_unref(lc->im_notif_policy);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ static int callback_all(void *data, int argc, char **argv, char **colName){
|
|||
LinphoneAddress *addr = linphone_address_new(address);
|
||||
if (addr){
|
||||
linphone_core_get_chat_room(lc, addr);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1302,14 +1302,14 @@ static void linphone_core_migrate_proxy_config(LinphoneCore *lc, LinphoneTranspo
|
|||
tmp=linphone_address_as_string(proxy_addr);
|
||||
linphone_proxy_config_set_server_addr(cfg,tmp);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(proxy_addr);
|
||||
linphone_address_unref(proxy_addr);
|
||||
}
|
||||
if (route_addr){
|
||||
linphone_address_set_transport(route_addr,type);
|
||||
tmp=linphone_address_as_string(route_addr);
|
||||
linphone_proxy_config_set_route(cfg,tmp);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(route_addr);
|
||||
linphone_address_unref(route_addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1547,7 +1547,7 @@ void linphone_subscription_new(LinphoneCore *lc, SalOp *op, const char *from){
|
|||
linphone_core_add_subscriber(lc,tmp,op);
|
||||
}
|
||||
}
|
||||
linphone_address_destroy(uri);
|
||||
linphone_address_unref(uri);
|
||||
ms_free(tmp);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ Copyright (C) 2000 Simon MORLAT (simon.morlat@linphone.org)
|
|||
|
||||
/*store current config related to server location*/
|
||||
static void linphone_proxy_config_store_server_config(LinphoneProxyConfig* cfg) {
|
||||
if (cfg->saved_identity) linphone_address_destroy(cfg->saved_identity);
|
||||
if (cfg->saved_identity) linphone_address_unref(cfg->saved_identity);
|
||||
if (cfg->identity_address)
|
||||
cfg->saved_identity = linphone_address_clone(cfg->identity_address);
|
||||
else
|
||||
cfg->saved_identity = NULL;
|
||||
|
||||
if (cfg->saved_proxy) linphone_address_destroy(cfg->saved_proxy);
|
||||
if (cfg->saved_proxy) linphone_address_unref(cfg->saved_proxy);
|
||||
if (cfg->reg_proxy)
|
||||
cfg->saved_proxy = linphone_address_new(cfg->reg_proxy);
|
||||
else
|
||||
|
|
@ -52,7 +52,7 @@ LinphoneProxyConfigAddressComparisonResult linphone_proxy_config_address_equal(c
|
|||
return LinphoneProxyConfigAddressEqual;
|
||||
if (linphone_address_weak_equal(a,b)) {
|
||||
/*also check both transport and uri */
|
||||
if (linphone_address_is_secure(a) == linphone_address_is_secure(b) && linphone_address_get_transport(a) == linphone_address_get_transport(b))
|
||||
if (linphone_address_get_secure(a) == linphone_address_get_secure(b) && linphone_address_get_transport(a) == linphone_address_get_transport(b))
|
||||
return LinphoneProxyConfigAddressWeakEqual;
|
||||
else
|
||||
return LinphoneProxyConfigAddressDifferent;
|
||||
|
|
@ -78,7 +78,7 @@ LinphoneProxyConfigAddressComparisonResult linphone_proxy_config_is_server_confi
|
|||
if (result == LinphoneProxyConfigAddressEqual) result = result_identity;
|
||||
|
||||
end:
|
||||
if (current_proxy) linphone_address_destroy(current_proxy);
|
||||
if (current_proxy) linphone_address_unref(current_proxy);
|
||||
ms_message("linphone_proxy_config_is_server_config_changed : %i", result);
|
||||
return result;
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ void _linphone_proxy_config_release_ops(LinphoneProxyConfig *cfg){
|
|||
void _linphone_proxy_config_destroy(LinphoneProxyConfig *cfg){
|
||||
if (cfg->reg_proxy!=NULL) ms_free(cfg->reg_proxy);
|
||||
if (cfg->reg_identity!=NULL) ms_free(cfg->reg_identity);
|
||||
if (cfg->identity_address!=NULL) linphone_address_destroy(cfg->identity_address);
|
||||
if (cfg->identity_address!=NULL) linphone_address_unref(cfg->identity_address);
|
||||
if (cfg->reg_route!=NULL) ms_free(cfg->reg_route);
|
||||
if (cfg->quality_reporting_collector!=NULL) ms_free(cfg->quality_reporting_collector);
|
||||
if (cfg->ssctx!=NULL) sip_setup_context_free(cfg->ssctx);
|
||||
|
|
@ -217,8 +217,8 @@ void _linphone_proxy_config_destroy(LinphoneProxyConfig *cfg){
|
|||
if (cfg->dial_prefix!=NULL) ms_free(cfg->dial_prefix);
|
||||
if (cfg->contact_params) ms_free(cfg->contact_params);
|
||||
if (cfg->contact_uri_params) ms_free(cfg->contact_uri_params);
|
||||
if (cfg->saved_proxy!=NULL) linphone_address_destroy(cfg->saved_proxy);
|
||||
if (cfg->saved_identity!=NULL) linphone_address_destroy(cfg->saved_identity);
|
||||
if (cfg->saved_proxy!=NULL) linphone_address_unref(cfg->saved_proxy);
|
||||
if (cfg->saved_identity!=NULL) linphone_address_unref(cfg->saved_identity);
|
||||
if (cfg->sent_headers!=NULL) sal_custom_header_free(cfg->sent_headers);
|
||||
if (cfg->pending_contact) linphone_address_unref(cfg->pending_contact);
|
||||
if (cfg->refkey) ms_free(cfg->refkey);
|
||||
|
|
@ -267,7 +267,7 @@ int linphone_proxy_config_set_server_addr(LinphoneProxyConfig *cfg, const char *
|
|||
addr=linphone_address_new(server_addr);
|
||||
if (addr){
|
||||
cfg->reg_proxy=linphone_address_as_string(addr);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}else{
|
||||
ms_warning("Could not parse %s",server_addr);
|
||||
return -1;
|
||||
|
|
@ -285,7 +285,7 @@ int linphone_proxy_config_set_identity_address(LinphoneProxyConfig *cfg, const L
|
|||
return -1;
|
||||
}
|
||||
if (cfg->identity_address != NULL) {
|
||||
linphone_address_destroy(cfg->identity_address);
|
||||
linphone_address_unref(cfg->identity_address);
|
||||
}
|
||||
cfg->identity_address=linphone_address_clone(addr);
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ int linphone_proxy_config_set_identity(LinphoneProxyConfig *cfg, const char *ide
|
|||
if (identity!=NULL && strlen(identity)>0){
|
||||
LinphoneAddress *addr=linphone_address_new(identity);
|
||||
int ret=linphone_proxy_config_set_identity_address(cfg, addr);
|
||||
if (addr) linphone_address_destroy(addr);
|
||||
if (addr) linphone_address_unref(addr);
|
||||
return ret;
|
||||
}
|
||||
return -1;
|
||||
|
|
@ -446,7 +446,7 @@ LinphoneAddress *guess_contact_for_register(LinphoneProxyConfig *cfg){
|
|||
|
||||
ret=contact;
|
||||
}
|
||||
linphone_address_destroy(proxy);
|
||||
linphone_address_unref(proxy);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -465,7 +465,7 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
|
|||
LinphoneAddress *contact;
|
||||
ms_message("LinphoneProxyConfig [%p] about to register (LinphoneCore version: %s)",cfg,linphone_core_get_version());
|
||||
proxy_string=linphone_address_as_string_uri_only(proxy);
|
||||
linphone_address_destroy(proxy);
|
||||
linphone_address_unref(proxy);
|
||||
if (cfg->op)
|
||||
sal_op_release(cfg->op);
|
||||
cfg->op=sal_op_new(cfg->lc->sal);
|
||||
|
|
@ -474,7 +474,7 @@ static void linphone_proxy_config_register(LinphoneProxyConfig *cfg){
|
|||
|
||||
if ((contact=guess_contact_for_register(cfg))) {
|
||||
sal_op_set_contact_address(cfg->op,contact);
|
||||
linphone_address_destroy(contact);
|
||||
linphone_address_unref(contact);
|
||||
}
|
||||
|
||||
sal_op_set_user_pointer(cfg->op,cfg);
|
||||
|
|
@ -558,7 +558,7 @@ void linphone_proxy_config_set_quality_reporting_collector(LinphoneProxyConfig *
|
|||
}
|
||||
|
||||
if (addr){
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -693,7 +693,7 @@ static LinphoneAddress* _linphone_core_destroy_addr_if_not_sip( LinphoneAddress*
|
|||
if( linphone_address_is_sip(addr) ) {
|
||||
return addr;
|
||||
} else {
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ static int send_report(LinphoneCall* call, reporting_session_report_t * report,
|
|||
STR_REASSIGN(report->qos_analyzer.output, NULL);
|
||||
}
|
||||
|
||||
linphone_address_destroy(request_uri);
|
||||
linphone_address_unref(request_uri);
|
||||
linphone_content_unref(content);
|
||||
|
||||
end:
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ static int sip_login_do_login(SipSetupContext * ctx, const char *uri, const char
|
|||
linphone_proxy_config_enable_register(cfg,TRUE);
|
||||
linphone_proxy_config_done(cfg);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(parsed_uri);
|
||||
linphone_address_unref(parsed_uri);
|
||||
ms_message("SipLogin: done");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, cons
|
|||
}
|
||||
strncpy(ctx->domain,linphone_address_get_domain(from),sizeof(ctx->domain));
|
||||
strncpy(ctx->username,linphone_address_get_username(from),sizeof(ctx->username));
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
if (ctx->funcs->login_account)
|
||||
return ctx->funcs->login_account(ctx,uri,passwd,userid);
|
||||
return -1;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ void RegisterCommand::exec(Daemon *app, const string& args) {
|
|||
if (from != NULL) {
|
||||
LinphoneAuthInfo *info = linphone_auth_info_new(linphone_address_get_username(from), cuserid, cpassword, NULL, crealm, NULL);
|
||||
linphone_core_add_auth_info(lc, info); /* Add authentication info to LinphoneCore */
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
linphone_auth_info_destroy(info);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -878,7 +878,7 @@ Daemon::~Daemon() {
|
|||
}
|
||||
|
||||
enableLSD(false);
|
||||
linphone_core_destroy(mLc);
|
||||
linphone_core_unref(mLc);
|
||||
if (mChildFd != (ortp_pipe_t)-1) {
|
||||
ortp_server_pipe_close_client(mChildFd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ static gboolean grab_focus(GtkWidget *w){
|
|||
void linphone_gtk_friend_list_set_active_address(const LinphoneAddress *addr){
|
||||
GtkWidget *w=linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist=linphone_gtk_get_widget(w,"contact_list");
|
||||
g_object_set_data_full(G_OBJECT(friendlist),"from", addr ? linphone_address_clone(addr) : NULL, (GDestroyNotify)linphone_address_destroy);
|
||||
g_object_set_data_full(G_OBJECT(friendlist),"from", addr ? linphone_address_clone(addr) : NULL, (GDestroyNotify)linphone_address_unref);
|
||||
}
|
||||
|
||||
const LinphoneAddress *linphone_gtk_friend_list_get_active_address(void){
|
||||
|
|
@ -516,7 +516,7 @@ static void icon_press_handler(GtkEntry *entry){
|
|||
linphone_friend_set_address(lf,addr);
|
||||
linphone_gtk_show_contact(lf, w);
|
||||
}
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -879,7 +879,7 @@ void linphone_gtk_contact_ok(GtkWidget *button){
|
|||
linphone_core_add_friend(linphone_gtk_get_core(),lf);
|
||||
}
|
||||
}
|
||||
linphone_address_destroy(friend_address);
|
||||
linphone_address_unref(friend_address);
|
||||
linphone_gtk_show_friends();
|
||||
gtk_widget_destroy(w);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -465,7 +465,7 @@ static void video_button_clicked(GtkWidget *button, LinphoneCall *call){
|
|||
gtk_widget_set_sensitive(button,FALSE);
|
||||
linphone_call_params_enable_video(params, adding);
|
||||
linphone_core_update_call(lc,call,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
|
||||
void linphone_gtk_update_video_button(LinphoneCall *call){
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
|
|||
linphone_address_set_username(addr,username);
|
||||
tmp=linphone_address_as_string (addr);
|
||||
do_login(ssctx,tmp,NULL,NULL);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
linphone_gtk_load_identities();
|
||||
return FALSE;
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ static void linphone_gtk_init_login_frame(GtkWidget *login_frame, LinphoneProxyC
|
|||
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_userid")),
|
||||
userid ? userid : "");
|
||||
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
}
|
||||
|
||||
void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login){
|
||||
|
|
|
|||
12
gtk/main.c
12
gtk/main.c
|
|
@ -906,8 +906,8 @@ static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
|
|||
linphone_call_params_set_record_file(params,record_file);
|
||||
linphone_core_invite_address_with_params(lc,addr,params);
|
||||
completion_add_text(GTK_ENTRY(uri_bar),entered);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_address_unref(addr);
|
||||
linphone_call_params_unref(params);
|
||||
g_free(record_file);
|
||||
}else{
|
||||
linphone_gtk_call_terminated(NULL,NULL);
|
||||
|
|
@ -921,7 +921,7 @@ static void accept_incoming_call(LinphoneCall *call){
|
|||
gchar *record_file=linphone_gtk_get_record_path(linphone_call_get_remote_address(call),FALSE);
|
||||
linphone_call_params_set_record_file(params,record_file);
|
||||
linphone_core_accept_call_with_params(lc,call,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
|
||||
static gboolean linphone_gtk_auto_answer(LinphoneCall *call){
|
||||
|
|
@ -958,7 +958,7 @@ void linphone_gtk_start_chat(GtkWidget *w){
|
|||
LinphoneAddress *addr=linphone_core_interpret_url(lc,entered);
|
||||
if (addr) {
|
||||
linphone_gtk_friend_list_set_chat_conversation(addr);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1312,7 +1312,7 @@ static void on_call_updated_response(GtkWidget *dialog, gint responseid, gpointe
|
|||
LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
|
||||
linphone_call_params_enable_video(params,responseid==GTK_RESPONSE_YES);
|
||||
linphone_core_accept_call_update(lc,call,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
g_source_remove_by_user_data(dialog);
|
||||
gtk_widget_destroy(dialog);
|
||||
|
|
@ -1997,7 +1997,7 @@ void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
|
|||
if(addr) {
|
||||
const char *tmp = linphone_address_get_method_param(addr);
|
||||
strncpy(method, tmp, sizeof(20));
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
}
|
||||
if(strlen(method) == 0 || strcmp(method, "INVITE") == 0) {
|
||||
GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ void linphone_gtk_update_my_contact(GtkWidget *w){
|
|||
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"sip_address")),contact);
|
||||
linphone_core_set_primary_contact(linphone_gtk_get_core(),contact);
|
||||
ms_free(contact);
|
||||
linphone_address_destroy(parsed);
|
||||
linphone_address_unref(parsed);
|
||||
linphone_gtk_load_identities();
|
||||
}
|
||||
|
||||
|
|
@ -974,7 +974,7 @@ static void update_proxy_transport(GtkWidget *w){
|
|||
}else{
|
||||
fill_transport_combo_box(combo,linphone_address_get_transport(laddr),TRUE);
|
||||
}
|
||||
linphone_address_destroy(laddr);
|
||||
linphone_address_unref(laddr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -998,7 +998,7 @@ void linphone_gtk_proxy_transport_changed(GtkWidget *combo){
|
|||
gtk_entry_set_text(GTK_ENTRY(proxy),newaddr);
|
||||
ms_free(newaddr);
|
||||
}
|
||||
linphone_address_destroy(laddr);
|
||||
linphone_address_unref(laddr);
|
||||
}
|
||||
g_object_set_data(G_OBJECT(w),"combo-updating",GINT_TO_POINTER(0));
|
||||
}
|
||||
|
|
@ -1074,7 +1074,7 @@ void linphone_gtk_proxy_ok(GtkButton *button){
|
|||
linphone_proxy_config_set_server_addr(cfg,tmp);
|
||||
ms_free(tmp);
|
||||
}
|
||||
linphone_address_destroy(laddr);
|
||||
linphone_address_unref(laddr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1698,7 +1698,7 @@ void linphone_gtk_show_parameters(void){
|
|||
}
|
||||
if (linphone_address_get_username(contact))
|
||||
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")),linphone_address_get_username(contact));
|
||||
linphone_address_destroy(contact);
|
||||
linphone_address_unref(contact);
|
||||
}
|
||||
#ifdef BUILD_WIZARD
|
||||
gtk_widget_show(linphone_gtk_get_widget(pb,"wizard"));
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ bool_t linphone_gtk_is_friend(LinphoneCore *lc, const char *contact) {
|
|||
if (addr) {
|
||||
char *uri = linphone_address_as_string_uri_only(addr);
|
||||
LinphoneFriend *lf = linphone_core_get_friend_by_address(lc, uri);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
if (uri) ms_free(uri);
|
||||
if (lf) return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,12 @@ typedef struct _LinphoneFactory LinphoneFactory;
|
|||
*/
|
||||
LINPHONE_PUBLIC LinphoneFactory *linphone_factory_get(void);
|
||||
|
||||
/**
|
||||
* Clean the factory. This function is generally useless as the factory is unique per process, however
|
||||
* calling this function at the end avoid getting reports from belle-sip leak detector about memory leaked in linphone_factory_get().
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_factory_clean(void);
|
||||
|
||||
/**
|
||||
* Instanciate a #LinphoneCore object.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
lcs=bctbx_list_append(lcs,laure->lc);
|
||||
|
||||
BC_ASSERT_TRUE(call_with_caller_params(marie,pauline,marie_params));
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
pauline_called_by_marie=linphone_core_get_current_call(pauline->lc);
|
||||
|
||||
if (enable_caller_privacy)
|
||||
linphone_call_params_set_privacy(laure_params,LinphonePrivacyId);
|
||||
|
||||
BC_ASSERT_PTR_NOT_NULL(linphone_core_invite_address_with_params(laure->lc,pauline->identity,laure_params));
|
||||
linphone_call_params_destroy(laure_params);
|
||||
linphone_call_params_unref(laure_params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(laure->lc
|
||||
,pauline->lc
|
||||
|
|
@ -134,7 +134,7 @@ static void second_call_rejection(bool_t second_without_audio){
|
|||
linphone_call_params_enable_audio(params, !second_without_audio);
|
||||
marie_call = linphone_core_invite_with_params(marie->lc, "sip:laure_non_exstent@test.linphone.org", params);
|
||||
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
if (second_without_audio){
|
||||
BC_ASSERT_PTR_NOT_NULL(marie_call);
|
||||
|
|
@ -345,7 +345,7 @@ static void simple_conference_base(LinphoneCoreManager* marie, LinphoneCoreManag
|
|||
if(conference) {
|
||||
bctbx_list_t *participants = linphone_conference_get_participants(conference);
|
||||
BC_ASSERT_EQUAL((unsigned int)bctbx_list_size(participants), 2, unsigned int, "%u");
|
||||
bctbx_list_free_with_data(participants, (void(*)(void *))linphone_address_destroy);
|
||||
bctbx_list_free_with_data(participants, (void(*)(void *))linphone_address_unref);
|
||||
}
|
||||
|
||||
linphone_core_terminate_conference(marie->lc);
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ static void early_media_with_multicast_base(bool_t video) {
|
|||
linphone_core_update_call( pauline->lc
|
||||
, linphone_core_get_current_call(pauline->lc)
|
||||
, params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2,1000));
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ bool_t call_with_params2(LinphoneCoreManager* caller_mgr
|
|||
} else {
|
||||
BC_ASSERT_FALSE(linphone_address_weak_equal(callee_from,linphone_call_get_remote_address(linphone_core_get_current_call(callee_mgr->lc))));
|
||||
}
|
||||
linphone_address_destroy(callee_from);
|
||||
linphone_address_unref(callee_from);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -332,7 +332,7 @@ bool_t call_with_params2(LinphoneCoreManager* caller_mgr
|
|||
LinphoneCallParams *default_params=linphone_core_create_call_params(callee_mgr->lc,callee_call);
|
||||
ms_message("Created default call params with video=%i", linphone_call_params_video_enabled(default_params));
|
||||
linphone_core_accept_call_with_params(callee_mgr->lc,callee_call,default_params);
|
||||
linphone_call_params_destroy(default_params);
|
||||
linphone_call_params_unref(default_params);
|
||||
}else{
|
||||
linphone_core_accept_call(callee_mgr->lc,callee_call);
|
||||
}
|
||||
|
|
@ -481,7 +481,7 @@ void simple_call_base(bool_t enable_multicast_recv_side) {
|
|||
linphone_proxy_config_done(marie_cfg);
|
||||
|
||||
ms_free(marie_tmp_id);
|
||||
linphone_address_destroy(marie_addr);
|
||||
linphone_address_unref(marie_addr);
|
||||
}
|
||||
|
||||
linphone_core_enable_audio_multicast(pauline->lc,enable_multicast_recv_side);
|
||||
|
|
@ -554,7 +554,7 @@ static void simple_call_with_udp(void) {
|
|||
linphone_proxy_config_done(michelle_cfg);
|
||||
|
||||
ms_free(michelle_tmp_id);
|
||||
linphone_address_destroy(michelle_addr);
|
||||
linphone_address_unref(michelle_addr);
|
||||
}
|
||||
|
||||
BC_ASSERT_TRUE(call(michelle,laure));
|
||||
|
|
@ -662,7 +662,7 @@ static void direct_call_over_ipv6(void){
|
|||
end_call(marie,pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_address_destroy(pauline_dest);
|
||||
linphone_address_unref(pauline_dest);
|
||||
}else ms_warning("Test skipped, no ipv6 available");
|
||||
}
|
||||
|
||||
|
|
@ -925,7 +925,7 @@ static void simple_call_compatibility_mode(void) {
|
|||
sprintf(route,"sip:%s",test_route);
|
||||
linphone_proxy_config_set_route(proxy,route);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(proxy_address);
|
||||
linphone_address_unref(proxy_address);
|
||||
linphone_core_get_sip_transports(lc_marie,&transport);
|
||||
transport.udp_port=0;
|
||||
transport.tls_port=0;
|
||||
|
|
@ -1350,7 +1350,7 @@ static void ice_added_by_reinvite(void){
|
|||
c = linphone_core_get_current_call(marie->lc);
|
||||
params = linphone_core_create_call_params(marie->lc, c);
|
||||
linphone_core_update_call(marie->lc, c, params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallUpdatedByRemote,1));
|
||||
|
||||
/*wait for the ICE reINVITE*/
|
||||
|
|
@ -1382,7 +1382,7 @@ static void call_with_custom_headers(void) {
|
|||
snprintf(tmp2,sizeof(tmp2),"%s?uriHeader=myUriHeader",tmp);
|
||||
marie_identity=linphone_address_new(tmp2);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(marie->identity);
|
||||
linphone_address_unref(marie->identity);
|
||||
marie->identity=marie_identity;
|
||||
|
||||
params=linphone_core_create_call_params(marie->lc, NULL);
|
||||
|
|
@ -1429,7 +1429,7 @@ static void call_with_custom_headers(void) {
|
|||
end_call(pauline, marie);
|
||||
|
||||
end:
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -1446,7 +1446,7 @@ static void call_with_custom_sdp_attributes_cb(LinphoneCore *lc, LinphoneCall *c
|
|||
linphone_call_params_clear_custom_sdp_media_attributes(params, LinphoneStreamTypeAudio);
|
||||
linphone_call_params_add_custom_sdp_attribute(params, "working", "no");
|
||||
BC_ASSERT_EQUAL(linphone_core_accept_call_update(lc, call, params), 0, int, "%i");
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1465,7 +1465,7 @@ static void call_with_custom_sdp_attributes(void) {
|
|||
linphone_call_params_add_custom_sdp_attribute(pauline_params, "working", "yes");
|
||||
linphone_call_params_add_custom_sdp_media_attribute(pauline_params, LinphoneStreamTypeAudio, "sleeping", "almost");
|
||||
BC_ASSERT_TRUE(call_with_caller_params(pauline, marie, pauline_params));
|
||||
linphone_call_params_destroy(pauline_params);
|
||||
linphone_call_params_unref(pauline_params);
|
||||
|
||||
call_marie = linphone_core_get_current_call(marie->lc);
|
||||
call_pauline = linphone_core_get_current_call(pauline->lc);
|
||||
|
|
@ -1490,7 +1490,7 @@ static void call_with_custom_sdp_attributes(void) {
|
|||
linphone_core_update_call(pauline->lc, call_pauline, pauline_params);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &marie->stat.number_of_LinphoneCallUpdatedByRemote, 1));
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallUpdating, 1));
|
||||
linphone_call_params_destroy(pauline_params);
|
||||
linphone_call_params_unref(pauline_params);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2));
|
||||
pauline_remote_params = linphone_call_get_remote_params(call_pauline);
|
||||
value = linphone_call_params_get_custom_sdp_attribute(pauline_remote_params, "working");
|
||||
|
|
@ -1866,7 +1866,7 @@ static void call_with_privacy(void) {
|
|||
linphone_call_params_set_privacy(params,LinphonePrivacyId);
|
||||
|
||||
BC_ASSERT_TRUE(call_with_caller_params(pauline,marie,params));
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
c1=linphone_core_get_current_call(pauline->lc);
|
||||
c2=linphone_core_get_current_call(marie->lc);
|
||||
|
|
@ -1926,7 +1926,7 @@ static void call_with_privacy2(void) {
|
|||
linphone_proxy_config_done(pauline_proxy);
|
||||
|
||||
BC_ASSERT_TRUE(call_with_caller_params(pauline,marie,params));
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
c1=linphone_core_get_current_call(pauline->lc);
|
||||
c2=linphone_core_get_current_call(marie->lc);
|
||||
|
|
@ -2514,7 +2514,7 @@ static void early_media_call_with_update_base(bool_t media_change){
|
|||
|
||||
linphone_call_params_set_session_name(pauline_params,UPDATED_SESSION_NAME);
|
||||
linphone_core_update_call(pauline->lc, pauline_call, pauline_params);
|
||||
linphone_call_params_destroy(pauline_params);
|
||||
linphone_call_params_unref(pauline_params);
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallEarlyUpdating,1,2000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallEarlyUpdatedByRemote,1,2000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallOutgoingEarlyMedia,1,2000));
|
||||
|
|
@ -2650,7 +2650,7 @@ static void call_established_with_complex_rejected_operation(void) {
|
|||
,linphone_core_get_current_call(marie->lc)
|
||||
,params);
|
||||
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,3));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,3));
|
||||
|
|
@ -3062,8 +3062,8 @@ void record_call(const char *filename, bool_t enableVideo, const char *video_cod
|
|||
remove(filepath);
|
||||
ms_free(filepath);
|
||||
}
|
||||
linphone_call_params_destroy(paulineParams);
|
||||
linphone_call_params_destroy(marieParams);
|
||||
linphone_call_params_unref(paulineParams);
|
||||
linphone_call_params_unref(marieParams);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -3087,7 +3087,7 @@ static void call_with_in_dialog_update(void) {
|
|||
params=linphone_core_create_call_params(marie->lc,linphone_core_get_current_call(marie->lc));
|
||||
params->no_user_consent=TRUE;
|
||||
linphone_core_update_call(marie->lc,linphone_core_get_current_call(marie->lc),params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,1));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallUpdatedByRemote,1));
|
||||
|
|
@ -3121,7 +3121,7 @@ static void call_with_very_early_call_update(void) {
|
|||
if(linphone_core_get_current_call(pauline->lc)) {
|
||||
params=linphone_core_create_call_params(pauline->lc,linphone_core_get_current_call(pauline->lc));
|
||||
linphone_core_update_call(pauline->lc,linphone_core_get_current_call(pauline->lc),params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallUpdating,1));
|
||||
|
|
@ -3158,7 +3158,7 @@ static void call_with_in_dialog_codec_change_base(bool_t no_sdp) {
|
|||
linphone_core_enable_sdp_200_ack(marie->lc,TRUE);
|
||||
}
|
||||
linphone_core_update_call(marie->lc,linphone_core_get_current_call(marie->lc),params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,1));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallUpdatedByRemote,1));
|
||||
|
|
@ -3244,10 +3244,10 @@ static void call_log_from_taken_from_p_asserted_id(void) {
|
|||
|
||||
/*make sure remote identity is hidden*/
|
||||
BC_ASSERT_TRUE(linphone_address_weak_equal(linphone_call_get_remote_address(c2),pauline_asserted_id_addr));
|
||||
linphone_address_destroy(pauline_asserted_id_addr);
|
||||
linphone_address_unref(pauline_asserted_id_addr);
|
||||
end_call(pauline, marie);
|
||||
end:
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -3370,7 +3370,7 @@ void early_media_without_sdp_in_200_base( bool_t use_video, bool_t use_ice ){
|
|||
}
|
||||
|
||||
marie_call = linphone_core_invite_address_with_params(marie->lc, pauline->identity, params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
marie_call_log = linphone_call_get_call_log(marie_call);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallIncomingReceived,1,3000));
|
||||
|
|
@ -3658,7 +3658,7 @@ static void call_with_complex_late_offering(void){
|
|||
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionInactive);
|
||||
|
||||
linphone_core_update_call(marie->lc, call_marie ,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,1));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallPausedByRemote,1));
|
||||
|
|
@ -3671,7 +3671,7 @@ static void call_with_complex_late_offering(void){
|
|||
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly);
|
||||
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendOnly);
|
||||
linphone_core_update_call(marie->lc, call_marie , params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
//Pauline OK with sendonly
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,2));
|
||||
|
|
@ -3705,7 +3705,7 @@ static void call_with_complex_late_offering(void){
|
|||
|
||||
linphone_core_update_call(marie->lc, call_marie,params);
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,3));
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallPausedByRemote,4));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,5));
|
||||
|
|
@ -3718,7 +3718,7 @@ static void call_with_complex_late_offering(void){
|
|||
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendRecv);
|
||||
linphone_core_update_call(marie->lc, call_marie,params);
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,3));
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallUpdatedByRemote,1));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,5));
|
||||
|
|
@ -4874,7 +4874,7 @@ static void call_logs_sqlite_storage(void) {
|
|||
laure = linphone_address_new("\"Laure\" <sip:laure@sip.example.org>");
|
||||
logs = linphone_core_get_call_history_for_address(marie->lc, laure);
|
||||
BC_ASSERT_TRUE(bctbx_list_size(logs) == 0);
|
||||
linphone_address_destroy(laure);
|
||||
linphone_address_unref(laure);
|
||||
|
||||
logs = linphone_core_get_call_history_for_address(marie->lc, linphone_proxy_config_get_identity_address(linphone_core_get_default_proxy_config(pauline->lc)));
|
||||
if (BC_ASSERT_TRUE(bctbx_list_size(logs) == 1)) {
|
||||
|
|
@ -4984,7 +4984,7 @@ static void call_with_http_proxy(void) {
|
|||
marie_call = linphone_core_get_current_call(marie->lc);
|
||||
contact_addr = linphone_address_new(linphone_call_get_remote_contact(marie_call));
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_domain(contact_addr),ip);
|
||||
linphone_address_destroy(contact_addr);
|
||||
linphone_address_unref(contact_addr);
|
||||
end_call(marie, pauline);
|
||||
end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ static void call_paused_resumed_with_video_base_call_cb(LinphoneCore *lc, Linpho
|
|||
linphone_call_params_enable_video(params, TRUE);
|
||||
ms_message (" New state LinphoneCallUpdatedByRemote on call [%p], accepting with video on",call);
|
||||
BC_ASSERT_NOT_EQUAL(linphone_core_accept_call_update(lc, call, params), 0, int, "%i");
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
}
|
||||
/*this test makes sure that pause/resume will not bring up video by accident*/
|
||||
|
|
@ -106,7 +106,7 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack
|
|||
}
|
||||
linphone_core_update_call(pauline->lc,call_pauline,params);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,3));
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
} else {
|
||||
linphone_core_resume_call(pauline->lc, call_pauline);
|
||||
BC_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallResuming,1));
|
||||
|
|
@ -156,7 +156,7 @@ static void call_state_changed_callback_to_accept_video(LinphoneCore *lc, Linpho
|
|||
LinphoneCallParams *params = linphone_core_create_call_params(lc, call);
|
||||
linphone_call_params_enable_video(params, TRUE);
|
||||
linphone_core_accept_call_update(lc, call, params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
}
|
||||
ms_message("video acceptance listener about to be dropped");
|
||||
vtable = belle_sip_object_data_get(BELLE_SIP_OBJECT(call),
|
||||
|
|
@ -196,7 +196,7 @@ static LinphoneCall* _request_video(LinphoneCoreManager* caller,LinphoneCoreMana
|
|||
/*add video*/
|
||||
linphone_call_params_enable_video(callee_params,TRUE);
|
||||
linphone_core_update_call(callee->lc,call_obj,callee_params);
|
||||
linphone_call_params_destroy(callee_params);
|
||||
linphone_call_params_unref(callee_params);
|
||||
}
|
||||
return call_obj;
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ static bool_t remove_video(LinphoneCoreManager *caller, LinphoneCoreManager *cal
|
|||
/* Remove video. */
|
||||
linphone_call_params_enable_video(callee_params, FALSE);
|
||||
linphone_core_update_call(callee->lc, call_obj, callee_params);
|
||||
linphone_call_params_destroy(callee_params);
|
||||
linphone_call_params_unref(callee_params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(caller->lc, callee->lc, &caller->stat.number_of_LinphoneCallUpdatedByRemote, initial_caller_stat.number_of_LinphoneCallUpdatedByRemote + 1));
|
||||
BC_ASSERT_TRUE(wait_for(caller->lc, callee->lc, &callee->stat.number_of_LinphoneCallUpdating, initial_callee_stat.number_of_LinphoneCallUpdating + 1));
|
||||
|
|
@ -460,8 +460,8 @@ static void call_with_declined_video_base(bool_t using_policy) {
|
|||
BC_ASSERT_TRUE((call_ok=call_with_params2(pauline,marie,&caller_test_params,&callee_test_params,using_policy)));
|
||||
if (!call_ok) goto end;
|
||||
|
||||
linphone_call_params_destroy(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
||||
linphone_call_params_unref(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_unref(callee_test_params.base);
|
||||
marie_call=linphone_core_get_current_call(marie->lc);
|
||||
pauline_call=linphone_core_get_current_call(pauline->lc);
|
||||
|
||||
|
|
@ -508,8 +508,8 @@ static void call_with_declined_video_despite_policy(void) {
|
|||
BC_ASSERT_TRUE((call_ok=call_with_params2(pauline,marie,&caller_test_params,&callee_test_params,FALSE)));
|
||||
if (!call_ok) goto end;
|
||||
|
||||
linphone_call_params_destroy(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
||||
linphone_call_params_unref(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_unref(callee_test_params.base);
|
||||
marie_call=linphone_core_get_current_call(marie->lc);
|
||||
pauline_call=linphone_core_get_current_call(pauline->lc);
|
||||
|
||||
|
|
@ -577,8 +577,8 @@ void video_call_base_2(LinphoneCoreManager* caller,LinphoneCoreManager* callee,
|
|||
callee_call=linphone_core_get_current_call(callee->lc);
|
||||
caller_call=linphone_core_get_current_call(caller->lc);
|
||||
|
||||
linphone_call_params_destroy(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
||||
linphone_call_params_unref(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_unref(callee_test_params.base);
|
||||
|
||||
if (callee_call && caller_call ) {
|
||||
if (callee_video_enabled && caller_video_enabled) {
|
||||
|
|
@ -690,8 +690,8 @@ void video_call_base_3(LinphoneCoreManager* caller,LinphoneCoreManager* callee,
|
|||
callee_call=linphone_core_get_current_call(callee->lc);
|
||||
caller_call=linphone_core_get_current_call(caller->lc);
|
||||
|
||||
linphone_call_params_destroy(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
||||
linphone_call_params_unref(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_unref(callee_test_params.base);
|
||||
|
||||
if (callee_call && caller_call ) {
|
||||
if (callee_video_enabled && caller_video_enabled) {
|
||||
|
|
@ -1119,7 +1119,7 @@ static void call_with_ice_video_and_rtt(void) {
|
|||
|
||||
end_call(pauline, marie);
|
||||
end:
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -1255,7 +1255,7 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone
|
|||
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendOnly);
|
||||
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendOnly);
|
||||
linphone_core_accept_call_with_params(marie->lc,call,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallStreamsRunning,1,DEFAULT_WAIT_FOR));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallPausedByRemote,1,DEFAULT_WAIT_FOR));
|
||||
|
|
@ -1384,7 +1384,7 @@ static void multiple_early_media(void) {
|
|||
linphone_call_params_enable_video(params,TRUE);
|
||||
|
||||
linphone_core_invite_address_with_params(pauline->lc,marie1->identity,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie1->stat.number_of_LinphoneCallIncomingEarlyMedia,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie2->stat.number_of_LinphoneCallIncomingEarlyMedia,1,3000));
|
||||
|
|
@ -1468,7 +1468,7 @@ static void audio_call_with_ice_with_video_policy_enabled(void){
|
|||
params = linphone_core_create_call_params(marie->lc, linphone_core_get_current_call(marie->lc));
|
||||
linphone_call_params_enable_video(params, TRUE);
|
||||
linphone_core_accept_call_with_params(marie->lc, linphone_core_get_current_call(marie->lc), params);
|
||||
linphone_call_params_destroy(params);*/
|
||||
linphone_call_params_unref(params);*/
|
||||
|
||||
/*wait for call to be established and ICE reINVITEs to be done */
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2));
|
||||
|
|
@ -1531,7 +1531,7 @@ static void classic_video_entry_phone_setup(void) {
|
|||
linphone_call_params_set_audio_direction(early_media_params, LinphoneMediaDirectionInactive);
|
||||
linphone_call_params_set_video_direction(early_media_params, LinphoneMediaDirectionRecvOnly);
|
||||
linphone_core_accept_early_media_with_params(callee_mgr->lc, callee_call, early_media_params);
|
||||
linphone_call_params_destroy(early_media_params);
|
||||
linphone_call_params_unref(early_media_params);
|
||||
|
||||
while ((caller_mgr->stat.number_of_LinphoneCallOutgoingEarlyMedia != 1) && (retry++ < 100)) {
|
||||
linphone_core_iterate(caller_mgr->lc);
|
||||
|
|
@ -1547,7 +1547,7 @@ static void classic_video_entry_phone_setup(void) {
|
|||
linphone_call_params_set_audio_direction(in_call_params, LinphoneMediaDirectionSendRecv);
|
||||
linphone_call_params_set_video_direction(in_call_params, LinphoneMediaDirectionSendRecv);
|
||||
linphone_core_accept_call_with_params(callee_mgr->lc, callee_call, in_call_params);
|
||||
linphone_call_params_destroy(in_call_params);
|
||||
linphone_call_params_unref(in_call_params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(callee_mgr->lc, caller_mgr->lc, &callee_mgr->stat.number_of_LinphoneCallConnected, 1));
|
||||
BC_ASSERT_TRUE(wait_for(callee_mgr->lc, caller_mgr->lc, &caller_mgr->stat.number_of_LinphoneCallConnected, 1));
|
||||
|
|
@ -1563,7 +1563,7 @@ static void classic_video_entry_phone_setup(void) {
|
|||
linphone_call_params_set_audio_direction(in_call_params, LinphoneMediaDirectionRecvOnly);
|
||||
linphone_call_params_set_video_direction(in_call_params, LinphoneMediaDirectionSendOnly);
|
||||
linphone_core_update_call(callee_mgr->lc, callee_call, in_call_params);
|
||||
linphone_call_params_destroy(in_call_params);
|
||||
linphone_call_params_unref(in_call_params);
|
||||
|
||||
ok = wait_for_until(callee_mgr->lc, caller_mgr->lc, &caller_mgr->stat.number_of_LinphoneCallStreamsRunning, 2, 2000)
|
||||
&& wait_for_until(callee_mgr->lc, caller_mgr->lc, &callee_mgr->stat.number_of_LinphoneCallStreamsRunning, 2, 2000);
|
||||
|
|
@ -1660,7 +1660,7 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
|
|||
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionInactive);
|
||||
|
||||
linphone_core_update_call(marie->lc, linphone_core_get_current_call(marie->lc),params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallUpdating,1));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
|
|
@ -1677,7 +1677,7 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_base(Linpho
|
|||
linphone_call_params_set_audio_direction(params,LinphoneMediaDirectionSendRecv);
|
||||
linphone_call_params_set_video_direction(params,LinphoneMediaDirectionSendRecv);
|
||||
linphone_core_update_call(marie->lc,linphone_core_get_current_call(marie->lc),params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphoneCallStreamsRunning,3));
|
||||
BC_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphoneCallStreamsRunning,2));
|
||||
|
|
@ -1825,8 +1825,8 @@ static void video_call_with_no_audio_and_no_video_codec(void){
|
|||
out_call = linphone_core_invite_address_with_params(caller->lc, callee->identity,caller_test_params.base);
|
||||
linphone_call_ref(out_call);
|
||||
|
||||
linphone_call_params_destroy(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
||||
linphone_call_params_unref(caller_test_params.base);
|
||||
if (callee_test_params.base) linphone_call_params_unref(callee_test_params.base);
|
||||
|
||||
|
||||
BC_ASSERT_TRUE(wait_for(caller->lc, callee->lc, &caller->stat.number_of_LinphoneCallOutgoingInit, 1));
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ static void early_media_call_forking(void) {
|
|||
linphone_call_params_enable_video(params,TRUE);
|
||||
|
||||
linphone_core_invite_address_with_params(pauline->lc,marie->identity,params);
|
||||
linphone_call_params_destroy(params);
|
||||
linphone_call_params_unref(params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie->stat.number_of_LinphoneCallIncomingEarlyMedia,1,3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie2->stat.number_of_LinphoneCallIncomingEarlyMedia,1,3000));
|
||||
|
|
@ -703,7 +703,7 @@ static bool_t is_remote_contact_ipv6(LinphoneCall *call){
|
|||
if (ct_addr){
|
||||
ret = strchr(linphone_address_get_domain(ct_addr),':') != NULL;
|
||||
}
|
||||
linphone_address_destroy(ct_addr);
|
||||
linphone_address_unref(ct_addr);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -994,7 +994,7 @@ static void test_subscribe_notify_with_sipp_publisher(void) {
|
|||
|
||||
sip_example_org = linphone_core_manager_resolve(marie, marie->identity);
|
||||
sipp_out = sip_start(scen, linphone_address_get_username(marie->identity), linphone_auth_info_get_passwd(marie_auth), sip_example_org);
|
||||
linphone_address_destroy(sip_example_org);
|
||||
linphone_address_unref(sip_example_org);
|
||||
|
||||
if (sipp_out) {
|
||||
/*wait for marie status*/
|
||||
|
|
@ -1140,7 +1140,7 @@ static void test_list_subscribe (void) {
|
|||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneSubscriptionTerminated,1,5000));
|
||||
|
||||
ms_free(subscribe_content);
|
||||
linphone_address_destroy(list_name);
|
||||
linphone_address_unref(list_name);
|
||||
linphone_content_unref(content);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
@ -1159,7 +1159,7 @@ static void test_subscribe_on_wrong_dialog(void) {
|
|||
scen = bc_tester_res("sipp/subscribe_on_wrong_dialog.xml");
|
||||
sip_example_org = linphone_core_manager_resolve(marie, marie->identity);
|
||||
sipp_out = sip_start(scen, linphone_address_get_username(marie->identity),linphone_auth_info_get_passwd(marie_auth), sip_example_org);
|
||||
linphone_address_destroy(sip_example_org);
|
||||
linphone_address_unref(sip_example_org);
|
||||
|
||||
if (sipp_out) {
|
||||
/*wait for marie status*/
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ static void text_message_compatibility_mode(void) {
|
|||
sprintf(route,"sip:%s",test_route);
|
||||
linphone_proxy_config_set_route(proxy,route);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(proxy_address);
|
||||
linphone_address_unref(proxy_address);
|
||||
linphone_core_set_sip_transports(marie->lc,&transport);
|
||||
marie->stat.number_of_LinphoneRegistrationOk=0;
|
||||
BC_ASSERT_TRUE (wait_for(marie->lc,marie->lc,&marie->stat.number_of_LinphoneRegistrationOk,1));
|
||||
|
|
@ -1665,7 +1665,7 @@ static void history_range(void){
|
|||
|
||||
end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_address_destroy(jehan_addr);
|
||||
linphone_address_unref(jehan_addr);
|
||||
remove(tmp_db);
|
||||
ms_free(src_db);
|
||||
bc_free(tmp_db);
|
||||
|
|
@ -1735,7 +1735,7 @@ static void history_count(void) {
|
|||
|
||||
end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_address_destroy(jehan_addr);
|
||||
linphone_address_unref(jehan_addr);
|
||||
remove(tmp_db);
|
||||
ms_free(src_db);
|
||||
bc_free(tmp_db);
|
||||
|
|
@ -1929,7 +1929,7 @@ static void real_time_text(bool_t audio_stream_enabled, bool_t srtp_enabled, boo
|
|||
end:
|
||||
end_call(marie, pauline);
|
||||
}
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
srtp_end:
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
@ -2045,7 +2045,7 @@ static void real_time_text_conversation(void) {
|
|||
}
|
||||
}
|
||||
end_call(marie, pauline);
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -2105,7 +2105,7 @@ static void real_time_text_message_compat(bool_t end_with_crlf, bool_t end_with_
|
|||
}
|
||||
end_call(marie, pauline);
|
||||
}
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -2163,7 +2163,7 @@ static void real_time_text_message_accented_chars(void) {
|
|||
}
|
||||
end_call(marie, pauline);
|
||||
}
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -2216,7 +2216,7 @@ static void real_time_text_copy_paste(void) {
|
|||
|
||||
end_call(marie, pauline);
|
||||
}
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ static void long_term_presence_phone_alias2(void) {
|
|||
long_term_presence_base(phone_addr_uri, TRUE, identity);
|
||||
ms_free(identity);
|
||||
ms_free(phone_addr_uri);
|
||||
linphone_address_destroy(phone_addr);
|
||||
linphone_address_unref(phone_addr);
|
||||
linphone_core_manager_destroy(marie);
|
||||
}
|
||||
|
||||
|
|
@ -827,7 +827,7 @@ static void long_term_presence_with_e164_phone_without_sip(void) {
|
|||
|
||||
ms_free(identity);
|
||||
ms_free(phone_addr_uri);
|
||||
linphone_address_destroy(phone_addr);
|
||||
linphone_address_unref(phone_addr);
|
||||
linphone_core_manager_destroy(marie);
|
||||
}else ms_warning("Test skipped, no vcard support");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ static void phone_normalization_with_dial_escape_plus(void){
|
|||
actual_str = linphone_address_as_string_uri_only(res); \
|
||||
BC_ASSERT_STRING_EQUAL(actual_str, expected); \
|
||||
ms_free(actual_str); \
|
||||
linphone_address_destroy(res); \
|
||||
linphone_address_unref(res); \
|
||||
linphone_proxy_config_destroy(proxy); \
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ static void quality_reporting_not_sent_if_low_bandwidth(void) {
|
|||
BC_ASSERT_EQUAL(marie->stat.number_of_LinphonePublishProgress,0, int, "%d");
|
||||
BC_ASSERT_EQUAL(marie->stat.number_of_LinphonePublishOk,0, int, "%d");
|
||||
}
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -320,8 +320,8 @@ static void quality_reporting_session_report_if_video_stopped(void) {
|
|||
BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphonePublishProgress,2,5000));
|
||||
BC_ASSERT_TRUE(wait_for_until(marie->lc,pauline->lc,&marie->stat.number_of_LinphonePublishOk,2,5000));
|
||||
}
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_destroy(pauline_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_call_params_unref(pauline_params);
|
||||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
@ -417,8 +417,8 @@ static void quality_reporting_interval_report_video_and_rtt(void) {
|
|||
wait_for_until(marie->lc,pauline->lc,NULL,0,6000);
|
||||
}
|
||||
|
||||
linphone_call_params_destroy(marie_params);
|
||||
linphone_call_params_destroy(pauline_params);
|
||||
linphone_call_params_unref(marie_params);
|
||||
linphone_call_params_unref(pauline_params);
|
||||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ static void register_with_refresh_base_3(LinphoneCore* lc
|
|||
} else {
|
||||
linphone_proxy_config_set_server_addr(proxy_cfg,server_addr);
|
||||
}
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
|
||||
linphone_core_add_proxy_config(lc,proxy_cfg);
|
||||
linphone_core_set_default_proxy(lc,proxy_cfg);
|
||||
|
|
@ -394,7 +394,7 @@ static void authenticated_register_with_provided_credentials(void){
|
|||
linphone_proxy_config_set_expires(cfg,1);
|
||||
linphone_proxy_config_set_route(cfg, test_route);
|
||||
linphone_proxy_config_set_server_addr(cfg,test_route);
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_unref(from);
|
||||
|
||||
ai = linphone_auth_info_new(test_username, NULL, test_password, NULL, NULL, NULL);
|
||||
linphone_core_add_auth_info(lcm->lc, ai);
|
||||
|
|
@ -657,7 +657,7 @@ static void proxy_transport_change(void){
|
|||
/*as we change p[roxy server destination, we should'nt be notified about the clear*/
|
||||
BC_ASSERT_EQUAL(counters->number_of_LinphoneRegistrationCleared,0, int, "%d");
|
||||
ms_free(addr_as_string);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
linphone_core_manager_destroy(lcm);
|
||||
|
||||
}
|
||||
|
|
@ -938,7 +938,7 @@ static void tls_with_non_tls_server(void){
|
|||
,(linphone_address_get_port(addr)>0?linphone_address_get_port(addr):5060));
|
||||
linphone_proxy_config_set_server_addr(proxy_cfg,tmp);
|
||||
linphone_proxy_config_done(proxy_cfg);
|
||||
linphone_address_destroy(addr);
|
||||
linphone_address_unref(addr);
|
||||
BC_ASSERT_TRUE(wait_for_until(lc,lc,&lcm->stat.number_of_LinphoneRegistrationFailed,1,10000));
|
||||
linphone_core_manager_destroy(lcm);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static void core_init_test(void) {
|
|||
}
|
||||
|
||||
static void linphone_address_test(void) {
|
||||
linphone_address_destroy(create_linphone_address(NULL));
|
||||
linphone_address_unref(create_linphone_address(NULL));
|
||||
BC_ASSERT_PTR_NULL(linphone_address_new("sip:@sip.linphone.org"));
|
||||
|
||||
}
|
||||
|
|
@ -100,14 +100,14 @@ static void linphone_interpret_url_test(void)
|
|||
BC_ASSERT_STRING_EQUAL(linphone_address_get_scheme(address), "sips");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_username(address), "margaux");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_domain(address), "sip.linphone.org");
|
||||
linphone_address_destroy(address);
|
||||
linphone_address_unref(address);
|
||||
|
||||
address = linphone_core_interpret_url(lc,"23");
|
||||
BC_ASSERT_PTR_NOT_NULL(address);
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_scheme(address), "sip");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_username(address), "23");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_domain(address), "sip.linphone.org");
|
||||
linphone_address_destroy(address);
|
||||
linphone_address_unref(address);
|
||||
|
||||
address = linphone_core_interpret_url(lc,"#24");
|
||||
BC_ASSERT_PTR_NOT_NULL(address);
|
||||
|
|
@ -116,13 +116,13 @@ static void linphone_interpret_url_test(void)
|
|||
BC_ASSERT_STRING_EQUAL(linphone_address_get_domain(address), "sip.linphone.org");
|
||||
tmp = linphone_address_as_string(address);
|
||||
BC_ASSERT_TRUE(strcmp (tmp,"sip:%2324@sip.linphone.org") == 0);
|
||||
linphone_address_destroy(address);
|
||||
linphone_address_unref(address);
|
||||
|
||||
address = linphone_core_interpret_url(lc,tmp);
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_scheme(address), "sip");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_username(address), "#24");
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_domain(address), "sip.linphone.org");
|
||||
linphone_address_destroy(address);
|
||||
linphone_address_unref(address);
|
||||
ms_free(tmp);
|
||||
|
||||
linphone_core_destroy (lc);
|
||||
|
|
@ -225,12 +225,12 @@ void linphone_proxy_config_address_equal_test(void) {
|
|||
BC_ASSERT_EQUAL(linphone_proxy_config_address_equal(c,f), LinphoneProxyConfigAddressDifferent, int, "%d");
|
||||
BC_ASSERT_EQUAL(linphone_proxy_config_address_equal(e,f), LinphoneProxyConfigAddressWeakEqual, int, "%d");
|
||||
|
||||
linphone_address_destroy(a);
|
||||
linphone_address_destroy(b);
|
||||
linphone_address_destroy(c);
|
||||
linphone_address_destroy(d);
|
||||
linphone_address_destroy(e);
|
||||
linphone_address_destroy(f);
|
||||
linphone_address_unref(a);
|
||||
linphone_address_unref(b);
|
||||
linphone_address_unref(c);
|
||||
linphone_address_unref(d);
|
||||
linphone_address_unref(e);
|
||||
linphone_address_unref(f);
|
||||
}
|
||||
|
||||
void linphone_proxy_config_is_server_config_changed_test(void) {
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies
|
|||
proxy = linphone_core_get_default_proxy_config(mgr->lc);
|
||||
if (proxy) {
|
||||
if (mgr->identity){
|
||||
linphone_address_destroy(mgr->identity);
|
||||
linphone_address_unref(mgr->identity);
|
||||
}
|
||||
mgr->identity = linphone_address_clone(linphone_proxy_config_get_identity_address(proxy));
|
||||
linphone_address_clean(mgr->identity);
|
||||
|
|
@ -470,7 +470,7 @@ void linphone_core_manager_uninit(LinphoneCoreManager *mgr) {
|
|||
}
|
||||
if (mgr->stat.last_received_info_message) linphone_info_message_destroy(mgr->stat.last_received_info_message);
|
||||
if (mgr->identity) {
|
||||
linphone_address_destroy(mgr->identity);
|
||||
linphone_address_unref(mgr->identity);
|
||||
}
|
||||
|
||||
manager_count--;
|
||||
|
|
@ -628,7 +628,7 @@ void liblinphone_tester_before_each(void) {
|
|||
static char* all_leaks_buffer = NULL;
|
||||
|
||||
void liblinphone_tester_after_each(void) {
|
||||
|
||||
linphone_factory_clean();
|
||||
if (!liblinphone_tester_leak_detector_disabled){
|
||||
int leaked_objects = belle_sip_object_get_object_count() - leaked_objects_count;
|
||||
if (leaked_objects > 0) {
|
||||
|
|
@ -858,7 +858,7 @@ static void linphone_conference_server_refer_received(LinphoneCore *core, const
|
|||
if(call) linphone_core_terminate_call(core, call);
|
||||
ms_free(uri);
|
||||
}
|
||||
linphone_address_destroy(refer_to_addr);
|
||||
linphone_address_unref(refer_to_addr);
|
||||
}
|
||||
|
||||
static void linphone_conference_server_registration_state_changed(LinphoneCore *core,
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ static void call_with_tunnel_base(LinphoneTunnelMode tunnel_mode, bool_t with_si
|
|||
BC_ASSERT_PTR_NOT_NULL(tmp);
|
||||
if (tmp){
|
||||
BC_ASSERT_STRING_EQUAL(linphone_address_get_domain(tmp), tunnel_ip);
|
||||
linphone_address_destroy(tmp);
|
||||
linphone_address_unref(tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -147,8 +147,8 @@ static void call_with_tunnel_base(LinphoneTunnelMode tunnel_mode, bool_t with_si
|
|||
|
||||
ms_free(public_ip);
|
||||
if(public_ip2 != NULL) ms_free(public_ip2);
|
||||
linphone_address_destroy(server_addr);
|
||||
linphone_address_destroy(route);
|
||||
linphone_address_unref(server_addr);
|
||||
linphone_address_unref(route);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
}else{
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
|
|||
marie2_params = configure_for_early_media_video_receiving_with_inactive_audio(marie2);
|
||||
|
||||
linphone_core_invite_address_with_params(pauline->lc, marie1->identity, pauline_params);
|
||||
linphone_call_params_destroy(pauline_params);
|
||||
linphone_call_params_unref(pauline_params);
|
||||
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie1->stat.number_of_LinphoneCallIncomingReceived, 1, 3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie2->stat.number_of_LinphoneCallIncomingReceived, 1, 3000));
|
||||
|
|
@ -509,8 +509,8 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void
|
|||
BC_ASSERT_TRUE(wait_for_list(lcs, &pauline->stat.number_of_LinphoneCallEnd, 1, 3000));
|
||||
BC_ASSERT_TRUE(wait_for_list(lcs, &marie1->stat.number_of_LinphoneCallEnd, 1, 3000));
|
||||
|
||||
linphone_call_params_destroy(marie1_params);
|
||||
linphone_call_params_destroy(marie2_params);
|
||||
linphone_call_params_unref(marie1_params);
|
||||
linphone_call_params_unref(marie2_params);
|
||||
bctbx_list_free(lcs);
|
||||
linphone_core_manager_destroy(marie1);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static void call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCal
|
|||
linphone_call_params_set_audio_direction(call_params,LinphoneMediaDirectionSendOnly);
|
||||
linphone_call_params_set_video_direction(call_params,LinphoneMediaDirectionSendOnly);
|
||||
linphone_core_accept_call_with_params(lc,call,call_params);
|
||||
linphone_call_params_destroy(call_params);
|
||||
linphone_call_params_unref(call_params);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -186,9 +186,9 @@ int main(int argc, char *argv[]){
|
|||
linphone_core_iterate(lc);
|
||||
ms_usleep(50000);
|
||||
}
|
||||
linphone_address_destroy(from);
|
||||
linphone_address_destroy(to);
|
||||
linphone_address_destroy(route);
|
||||
linphone_address_unref(from);
|
||||
linphone_address_unref(to);
|
||||
linphone_address_unref(route);
|
||||
linphone_core_destroy(lc);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue