Commit 16da9c1b authored by Simon Morlat's avatar Simon Morlat
Browse files

send username in contacts of publish

send unSUBSCRIBE when friend subscription is toggled off.
parent e48d96c6
...@@ -406,6 +406,8 @@ void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc){ ...@@ -406,6 +406,8 @@ void linphone_friend_apply(LinphoneFriend *fr, LinphoneCore *lc){
if (fr->subscribe && fr->subscribe_active==FALSE){ if (fr->subscribe && fr->subscribe_active==FALSE){
ms_message("Sending a new SUBSCRIBE"); ms_message("Sending a new SUBSCRIBE");
__linphone_friend_do_subscribe(fr); __linphone_friend_do_subscribe(fr);
}else if (fr->subscribe_active && !fr->subscribe){
linphone_friend_unsubscribe(fr);
} }
ms_message("linphone_friend_apply() done."); ms_message("linphone_friend_apply() done.");
lc->bl_refresh=TRUE; lc->bl_refresh=TRUE;
......
...@@ -5017,7 +5017,9 @@ static MSVideoSizeDef supported_resolutions[]={ ...@@ -5017,7 +5017,9 @@ static MSVideoSizeDef supported_resolutions[]={
{ {MS_VIDEO_SIZE_SVGA_W,MS_VIDEO_SIZE_SVGA_H} , "svga" }, { {MS_VIDEO_SIZE_SVGA_W,MS_VIDEO_SIZE_SVGA_H} , "svga" },
{ {MS_VIDEO_SIZE_4CIF_W,MS_VIDEO_SIZE_4CIF_H} , "4cif" }, { {MS_VIDEO_SIZE_4CIF_W,MS_VIDEO_SIZE_4CIF_H} , "4cif" },
{ {MS_VIDEO_SIZE_VGA_W,MS_VIDEO_SIZE_VGA_H} , "vga" }, { {MS_VIDEO_SIZE_VGA_W,MS_VIDEO_SIZE_VGA_H} , "vga" },
#ifdef __ios
{ {MS_VIDEO_SIZE_IOS_MEDIUM_H,MS_VIDEO_SIZE_IOS_MEDIUM_W} , "ios-medium" }, { {MS_VIDEO_SIZE_IOS_MEDIUM_H,MS_VIDEO_SIZE_IOS_MEDIUM_W} , "ios-medium" },
#endif
{ {MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H} , "cif" }, { {MS_VIDEO_SIZE_CIF_W,MS_VIDEO_SIZE_CIF_H} , "cif" },
{ {MS_VIDEO_SIZE_QVGA_W,MS_VIDEO_SIZE_QVGA_H} , "qvga" }, { {MS_VIDEO_SIZE_QVGA_W,MS_VIDEO_SIZE_QVGA_H} , "qvga" },
{ {MS_VIDEO_SIZE_QCIF_W,MS_VIDEO_SIZE_QCIF_H} , "qcif" }, { {MS_VIDEO_SIZE_QCIF_W,MS_VIDEO_SIZE_QCIF_H} , "qcif" },
......
...@@ -849,7 +849,7 @@ int linphone_proxy_config_send_publish(LinphoneProxyConfig *proxy, LinphonePrese ...@@ -849,7 +849,7 @@ int linphone_proxy_config_send_publish(LinphoneProxyConfig *proxy, LinphonePrese
sal_op_set_from(proxy->publish_op,linphone_proxy_config_get_identity(proxy)); sal_op_set_from(proxy->publish_op,linphone_proxy_config_get_identity(proxy));
sal_op_set_to(proxy->publish_op,linphone_proxy_config_get_identity(proxy)); sal_op_set_to(proxy->publish_op,linphone_proxy_config_get_identity(proxy));
if (lp_config_get_int(proxy->lc->config,"sip","publish_msg_with_contact",0)){ if (lp_config_get_int(proxy->lc->config,"sip","publish_msg_with_contact",0)){
SalAddress *addr=sal_address_new(NULL); SalAddress *addr=sal_address_new(linphone_proxy_config_get_identity(proxy));
sal_op_set_contact(proxy->publish_op,addr); sal_op_set_contact(proxy->publish_op,addr);
sal_address_unref(addr); sal_address_unref(addr);
} }
...@@ -1182,14 +1182,12 @@ void linphone_proxy_config_update(LinphoneProxyConfig *cfg){ ...@@ -1182,14 +1182,12 @@ void linphone_proxy_config_update(LinphoneProxyConfig *cfg){
} }
if (can_register(cfg)){ if (can_register(cfg)){
linphone_proxy_config_register(cfg); linphone_proxy_config_register(cfg);
ms_message("***Registering...(%p)",cfg);
cfg->commit=FALSE; cfg->commit=FALSE;
if (cfg->publish) cfg->send_publish=TRUE; if (cfg->publish) cfg->send_publish=TRUE;
} }
} }
if (cfg->send_publish && (cfg->state==LinphoneRegistrationOk || cfg->state==LinphoneRegistrationCleared)){ if (cfg->send_publish && (cfg->state==LinphoneRegistrationOk || cfg->state==LinphoneRegistrationCleared)){
linphone_proxy_config_send_publish(cfg,lc->presence_model); linphone_proxy_config_send_publish(cfg,lc->presence_model);
ms_message("***Publishing...");
cfg->send_publish=FALSE; cfg->send_publish=FALSE;
} }
} }
......
mediastreamer2 @ 7c4bfcb0
Subproject commit ec2d04150521197905bf5812991b54bab97fbdf8 Subproject commit 7c4bfcb0baf9ebc0e6edd94fc46b7a512fb733bf
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment