Package: linphone
Version: 3.6.1-2.4
Severity: normal
Tags: ipv6 patch

exosip 4 deprecated eXosip_enable_ipv6() in such a way that it fails
silently: https://sources.debian.net/src/libexosip2/4.1.0-2/src/eXconf.c/#L55

As a consequence, when enabling IPv6 in linphone, it tries to bind to an
IPv6 address (“::0”) while specifying IPv4 as address family, which
fails.

We need to switch to eXosip_set_option:

  eXosip_set_option(ctx->excontext, EXOSIP_OPT_ENABLE_IPV6, &ipv6);

I’ve attached a patch which updates debian/patches/port-to-exosip-4.patch
Unfortunately, it seems I’m using a different quilt version than you
are, so quilt touched all hunks, making the patch bigger than it needs
to be. The important hunk of my patch is:

@@ -704,7 +722,14 @@
        sal_set_dscp(ctx,ctx->dscp);
        sal_use_dates(ctx,ctx->add_dates);
  
-@@ -429,7 +482,11 @@ int sal_listen_port(Sal *ctx, const char
+       ipv6=strchr(addr,':')!=NULL;
++#ifdef HAVE_STRUCT_EXOSIP_T
++      eXosip_set_option(ctx->excontext, EXOSIP_OPT_ENABLE_IPV6, &ipv6);
++#else
+       eXosip_enable_ipv6(ipv6);
++#endif
+ 
+       if (is_secure && tr == SalTransportUDP){
                ms_fatal("SIP over DTLS is not supported yet.");
                return -1;
        }

Feel free to re-do my patch if that makes merging easier.

Thanks for your work on linphone!

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armel

Kernel: Linux 4.3.0 (SMP w/8 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages linphone depends on:
ii  libasound2                1.0.29-1
ii  libatk1.0-0               2.18.0-1
ii  libavcodec-ffmpeg56       7:2.8.1-1
ii  libavutil-ffmpeg54        7:2.8.1-1
ii  libc6                     2.19-22
ii  libcairo2                 1.14.2-2
ii  libexosip2-11             4.1.0-2+b1
ii  libfontconfig1            2.11.0-6.3
ii  libfreetype6              2.6-2
ii  libgdk-pixbuf2.0-0        2.32.1-1
ii  libgl1-mesa-glx [libgl1]  11.0.5-1
ii  libglew1.13               1.13.0-2
ii  libglib2.0-0              2.46.2-3
ii  libglu1-mesa [libglu1]    9.0.0-2.1
ii  libgtk2.0-0               2.24.28-1
ii  liblinphone5              3.6.1-2.4
ii  libmediastreamer-base3    3.6.1-2.4+b4
ii  libnotify4                0.7.6-2
ii  libogg0                   1.3.2-1
ii  libopus0                  1.1-2
ii  libortp9                  3.6.1-2.4+b4
ii  libosip2-11               4.1.0-2
ii  libpango-1.0-0            1.38.1-1
ii  libpangocairo-1.0-0       1.38.1-1
ii  libpangoft2-1.0-0         1.38.1-1
ii  libpulse0                 7.1-2
ii  libsoup2.4-1              2.52.1-1
ii  libspandsp2               0.0.6-2.1
ii  libspeex1                 1.2~rc1.2-1
ii  libspeexdsp1              1.2~rc1.2-1
ii  libsqlite3-0              3.8.11.1-1
ii  libswscale-ffmpeg3        7:2.8.1-1
ii  libtheora0                1.1.1+dfsg.1-7
ii  libudev1                  227-2
ii  libupnp6                  1:1.6.19+git20141001-1
ii  libv4l-0                  1.8.0-1
ii  libvpx3                   1.5.0-2
ii  libx11-6                  2:1.6.3-1
ii  libxv1                    2:1.0.10-1+b1
ii  linphone-nogtk            3.6.1-2.4

linphone recommends no packages.

Versions of packages linphone suggests:
pn  yelp  <none>

-- no debconf information
--- linphone-3.6.1/debian/patches/port-to-exosip-4.patch	2013-07-30 22:45:13.000000000 +0200
+++ /tmp/linphone-3.6.1/debian/patches/port-to-exosip-4.patch	2016-01-11 09:45:22.990338912 +0100
@@ -10,8 +10,10 @@
 Only in linphone-3.6.1: config.sub
 Only in linphone-3.6.1: configure
 Only in linphone-3.6.1/console: Makefile.in
---- a/coreapi/authentication.c
-+++ b/coreapi/authentication.c
+Index: linphone-3.6.1/coreapi/authentication.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/authentication.c
++++ linphone-3.6.1/coreapi/authentication.c
 @@ -308,7 +308,7 @@ void linphone_core_add_auth_info(Linphon
  			sai.userid=ai->userid;
  			sai.realm=ai->realm;
@@ -21,8 +23,10 @@
  			ai->usecount++;
  		}
  	}
---- a/coreapi/callbacks.c
-+++ b/coreapi/callbacks.c
+Index: linphone-3.6.1/coreapi/callbacks.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/callbacks.c
++++ linphone-3.6.1/coreapi/callbacks.c
 @@ -224,19 +224,19 @@ static void call_received(SalOp *h){
  	    lc->presence_mode==LinphoneStatusDoNotDisturb ||
  	    lc->presence_mode==LinphoneStatusMoved){
@@ -96,8 +100,10 @@
  	}
  }
  
---- a/coreapi/chat.c
-+++ b/coreapi/chat.c
+Index: linphone-3.6.1/coreapi/chat.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/chat.c
++++ linphone-3.6.1/coreapi/chat.c
 @@ -98,10 +98,10 @@ static void _linphone_chat_room_send_mes
  	}
  	if (msg->external_body_url) {
@@ -111,8 +117,10 @@
  	}
  	msg->dir=LinphoneChatMessageOutgoing;
  	msg->from=linphone_address_new(identity);
---- a/coreapi/friend.c
-+++ b/coreapi/friend.c
+Index: linphone-3.6.1/coreapi/friend.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/friend.c
++++ linphone-3.6.1/coreapi/friend.c
 @@ -131,13 +131,13 @@ void __linphone_friend_do_subscribe(Linp
  			fr->lc->vtable.notify_recv(fr->lc,(LinphoneFriend*)fr);
  		 */
@@ -167,8 +175,10 @@
  		lf->outsub=NULL;
  	}
  	if (lf->uri!=NULL) linphone_address_destroy(lf->uri);
---- a/coreapi/linphonecall.c
-+++ b/coreapi/linphonecall.c
+Index: linphone-3.6.1/coreapi/linphonecall.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/linphonecall.c
++++ linphone-3.6.1/coreapi/linphonecall.c
 @@ -526,7 +526,7 @@ LinphoneCall * linphone_call_new_incomin
  			from_str=linphone_address_as_string_uri_only(from);
  			sal_op_set_route(call->ping_op,sal_op_get_network_origin(op));
@@ -223,8 +233,10 @@
  }
  #endif
  
---- a/coreapi/linphonecore.c
-+++ b/coreapi/linphonecore.c
+Index: linphone-3.6.1/coreapi/linphonecore.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/linphonecore.c
++++ linphone-3.6.1/coreapi/linphonecore.c
 @@ -27,6 +27,11 @@ Foundation, Inc., 59 Temple Place - Suit
  #include <math.h>
  #include <ortp/telephonyevents.h>
@@ -427,8 +439,10 @@
  	}
  }
  
---- a/coreapi/presence.c
-+++ b/coreapi/presence.c
+Index: linphone-3.6.1/coreapi/presence.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/presence.c
++++ linphone-3.6.1/coreapi/presence.c
 @@ -79,21 +79,21 @@ void linphone_subscription_new(LinphoneC
  	if (linphone_find_friend(lc->friends,uri,&lf)!=NULL){
  		lf->insub=op;
@@ -472,8 +486,10 @@
  	if (lf!=NULL){
  		lf->insub=NULL;
  	}else{
---- a/coreapi/proxy.c
-+++ b/coreapi/proxy.c
+Index: linphone-3.6.1/coreapi/proxy.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/proxy.c
++++ linphone-3.6.1/coreapi/proxy.c
 @@ -84,8 +84,8 @@ void linphone_proxy_config_destroy(Linph
  	if (obj->realm!=NULL) ms_free(obj->realm);
  	if (obj->type!=NULL) ms_free(obj->type);
@@ -532,8 +548,10 @@
  	proxy->publish_op=op;
  	return err;
  }
---- a/coreapi/sal_eXosip2.c
-+++ b/coreapi/sal_eXosip2.c
+Index: linphone-3.6.1/coreapi/sal_eXosip2.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/sal_eXosip2.c
++++ linphone-3.6.1/coreapi/sal_eXosip2.c
 @@ -46,7 +46,11 @@ void _osip_list_set_empty(osip_list_t *l
  }
  
@@ -688,7 +706,7 @@
  		set_tls_options(ctx);
  		break;
  	default:
-@@ -416,9 +463,15 @@ int sal_listen_port(Sal *ctx, const char
+@@ -416,20 +463,34 @@ int sal_listen_port(Sal *ctx, const char
  	}
  	/*see if it looks like an IPv6 address*/
  	int use_rports = ctx->use_rports; // Copy char to int to avoid bad alignment
@@ -704,7 +722,14 @@
  	sal_set_dscp(ctx,ctx->dscp);
  	sal_use_dates(ctx,ctx->add_dates);
  
-@@ -429,7 +482,11 @@ int sal_listen_port(Sal *ctx, const char
+ 	ipv6=strchr(addr,':')!=NULL;
++#ifdef HAVE_STRUCT_EXOSIP_T
++	eXosip_set_option(ctx->excontext, EXOSIP_OPT_ENABLE_IPV6, &ipv6);
++#else
+ 	eXosip_enable_ipv6(ipv6);
++#endif
+ 
+ 	if (is_secure && tr == SalTransportUDP){
  		ms_fatal("SIP over DTLS is not supported yet.");
  		return -1;
  	}
@@ -716,7 +741,7 @@
  	ctx->running=TRUE;
  	return err;
  }
-@@ -444,7 +501,11 @@ ortp_socket_t sal_get_socket(Sal *ctx){
+@@ -444,7 +505,11 @@ ortp_socket_t sal_get_socket(Sal *ctx){
  }
  
  void sal_set_user_agent(Sal *ctx, const char *user_agent){
@@ -728,7 +753,7 @@
  }
  
  void sal_use_session_timers(Sal *ctx, int expires){
-@@ -472,11 +533,15 @@ void sal_use_dates(Sal *ctx, bool_t enab
+@@ -472,11 +537,15 @@ void sal_use_dates(Sal *ctx, bool_t enab
  #ifdef EXOSIP_OPT_REGISTER_WITH_DATE
  	{
  		int tmp=enabled;
@@ -746,7 +771,7 @@
  }
  
  void sal_use_rport(Sal *ctx, bool_t use_rports){
-@@ -499,7 +564,9 @@ const char *sal_get_root_ca(Sal* ctx) {
+@@ -499,7 +568,9 @@ const char *sal_get_root_ca(Sal* ctx) {
  
  void sal_verify_server_certificates(Sal *ctx, bool_t verify){
  	ctx->verify_server_certs=verify;
@@ -757,7 +782,7 @@
  	eXosip_tls_verify_certificate(verify);
  #endif
  }
-@@ -626,7 +693,7 @@ int sal_call_set_local_media_description
+@@ -626,7 +697,7 @@ int sal_call_set_local_media_description
  	return 0;
  }
  
@@ -766,7 +791,7 @@
  	int err;
  	const char *route;
  	osip_message_t *invite=NULL;
-@@ -638,7 +705,11 @@ int sal_call(SalOp *h, const char *from,
+@@ -638,7 +709,11 @@ int sal_call(SalOp *h, const char *from,
  	h->terminated = FALSE;
  
  	route = sal_op_get_route(h);
@@ -778,7 +803,7 @@
  	if (err!=0){
  		ms_error("Could not create call. Error %d (from=%s to=%s route=%s)",
  				err, from, to, route);
-@@ -664,9 +735,21 @@ int sal_call(SalOp *h, const char *from,
+@@ -664,9 +739,21 @@ int sal_call(SalOp *h, const char *from,
  			osip_message_set_header(invite,"Referred-By",h->referred_by);
  	}
  	
@@ -800,7 +825,7 @@
  	h->cid=err;
  	if (err<0){
  		ms_error("Fail to send invite ! Error code %d", err);
-@@ -682,14 +765,22 @@ int sal_call(SalOp *h, const char *from,
+@@ -682,14 +769,22 @@ int sal_call(SalOp *h, const char *from,
  	return 0;
  }
  
@@ -824,7 +849,7 @@
  		if (msg){
  			sdp_process(h);
  			if (h->sdp_answer){
-@@ -697,22 +788,46 @@ int sal_call_notify_ringing(SalOp *h, bo
+@@ -697,22 +792,46 @@ int sal_call_notify_ringing(SalOp *h, bo
  				sdp_message_free(h->sdp_answer);
  				h->sdp_answer=NULL;
  			}
@@ -872,7 +897,7 @@
  	if (err<0 || msg==NULL){
  		ms_error("Fail to build answer for call: err=%i",err);
  		return -1;
-@@ -741,39 +856,107 @@ int sal_call_accept(SalOp * h){
+@@ -741,39 +860,107 @@ int sal_call_accept(SalOp * h){
  	}else{
  		ms_error("You are accepting a call but not defined any media capabilities !");
  	}
@@ -982,7 +1007,7 @@
  	return 0;
  }
  
-@@ -796,39 +979,59 @@ int sal_call_set_referer(SalOp *h, SalOp
+@@ -796,39 +983,59 @@ int sal_call_set_referer(SalOp *h, SalOp
  	return 0;
  }
  
@@ -1047,7 +1072,7 @@
  					/* we need previous notify transaction to complete, so buffer the request for later*/
  					h->sipfrag_pending="SIP/2.0 200 Ok\r\n";
  				}
-@@ -838,61 +1041,126 @@ int sal_call_notify_refer_state(SalOp *h
+@@ -838,61 +1045,126 @@ int sal_call_notify_refer_state(SalOp *h
  	return 0;
  }
  
@@ -1180,7 +1205,7 @@
  		if (cid>0){
  			SalOp *ret=sal_find_call(h->base.root,cid);
  			return ret;
-@@ -901,48 +1169,81 @@ SalOp *sal_call_get_replaces(SalOp *h){
+@@ -901,48 +1173,81 @@ SalOp *sal_call_get_replaces(SalOp *h){
  	return NULL;
  }
  
@@ -1269,7 +1294,7 @@
  	if (err!=0){
  		ms_warning("Exosip could not terminate the call: cid=%i did=%i", h->cid,h->did);
  	}
-@@ -950,7 +1251,7 @@ int sal_call_terminate(SalOp *h){
+@@ -950,7 +1255,7 @@ int sal_call_terminate(SalOp *h){
  	return 0;
  }
  
@@ -1278,7 +1303,7 @@
         bool_t terminating=FALSE;
         if (h->pending_auth && strcmp(h->pending_auth->request->sip_method,"BYE")==0) {
                 terminating=TRUE;
-@@ -958,7 +1259,7 @@ void sal_op_authenticate(SalOp *h, const
+@@ -958,7 +1263,7 @@ void sal_op_authenticate(SalOp *h, const
         if (h->terminated && !terminating) return;
  
         if (h->pending_auth){
@@ -1287,7 +1312,7 @@
  		
          /*FIXME exosip does not take into account this update register message*/
  	/*
-@@ -967,11 +1268,23 @@ void sal_op_authenticate(SalOp *h, const
+@@ -967,11 +1272,23 @@ void sal_op_authenticate(SalOp *h, const
          };
  	*/
  		update_contact_from_response(h,h->pending_auth->response);
@@ -1312,7 +1337,7 @@
  		
  		if (h->auth_info) sal_auth_info_delete(h->auth_info); /*if already exist*/
  		h->auth_info=sal_auth_info_clone(info); /*store auth info for subsequent request*/
-@@ -1210,9 +1523,21 @@ static int call_proceeding(Sal *sal, eXo
+@@ -1210,9 +1527,21 @@ static int call_proceeding(Sal *sal, eXo
  
  	if (op==NULL || op->terminated==TRUE) {
  		ms_warning("This call has been canceled.");
@@ -1334,7 +1359,7 @@
  		return -1;
  	}
  	if (ev->did>0)
-@@ -1249,9 +1574,21 @@ static void call_accepted(Sal *sal, eXos
+@@ -1249,9 +1578,21 @@ static void call_accepted(Sal *sal, eXos
  	
  	if (op==NULL || op->terminated==TRUE) {
  		ms_warning("This call has been already terminated.");
@@ -1356,7 +1381,7 @@
  		return ;
  	}
  
-@@ -1266,12 +1603,28 @@ static void call_accepted(Sal *sal, eXos
+@@ -1266,12 +1607,28 @@ static void call_accepted(Sal *sal, eXos
  		sdp_message_free(sdp);
  		if (op->base.local_media) sdp_process(op);
  	}
@@ -1385,7 +1410,7 @@
  		return ;
  	}
  	contact=sal_op_get_contact(op);
-@@ -1284,7 +1637,11 @@ static void call_accepted(Sal *sal, eXos
+@@ -1284,7 +1641,11 @@ static void call_accepted(Sal *sal, eXos
  		sdp_message_free(op->sdp_answer);
  		op->sdp_answer=NULL;
  	}
@@ -1397,7 +1422,7 @@
  	sal->callbacks.call_accepted(op);
  }
  
-@@ -1458,7 +1815,11 @@ static bool_t call_failure(Sal *sal, eXo
+@@ -1458,7 +1819,11 @@ static bool_t call_failure(Sal *sal, eXo
  			sr=SalReasonMedia;
  		break;
  		case 422:
@@ -1409,7 +1434,7 @@
  			return TRUE;
  		break;
  		case 480:
-@@ -1494,7 +1855,7 @@ static bool_t call_failure(Sal *sal, eXo
+@@ -1494,7 +1859,7 @@ static bool_t call_failure(Sal *sal, eXo
  }
  
  /* Request remote side to send us VFU */
@@ -1418,7 +1443,7 @@
  	osip_message_t *msg=NULL;
  	char info_body[] =
  			"<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
-@@ -1508,17 +1869,33 @@ void sal_call_send_vfu_request(SalOp *h)
+@@ -1508,17 +1873,33 @@ void sal_call_send_vfu_request(SalOp *h)
  
  	char clen[10];
  
@@ -1452,7 +1477,7 @@
  }
  
  static void process_media_control_xml(Sal *sal, eXosip_event_t *ev){
-@@ -1537,20 +1914,45 @@ static void process_media_control_xml(Sa
+@@ -1537,20 +1918,45 @@ static void process_media_control_xml(Sa
  		ms_message("Receiving VFU request !");
  		if (sal->callbacks.vfu_request){
  			sal->callbacks.vfu_request(op);
@@ -1499,7 +1524,7 @@
  	}
  }
  
-@@ -1579,11 +1981,28 @@ static void process_dtmf_relay(Sal *sal,
+@@ -1579,11 +1985,28 @@ static void process_dtmf_relay(Sal *sal,
  					sal->callbacks.dtmf_received(op, tmp[0]);
  			}
  		}
@@ -1529,7 +1554,7 @@
  	}
  }
  
-@@ -1628,11 +2047,28 @@ static void process_refer(Sal *sal, SalO
+@@ -1628,11 +2051,28 @@ static void process_refer(Sal *sal, SalO
  			osip_free(tmp);
  			osip_from_free(from);
  		}
@@ -1559,7 +1584,7 @@
  	}
  	else
  	{
-@@ -1677,11 +2113,28 @@ static void process_notify(Sal *sal, eXo
+@@ -1677,11 +2117,28 @@ static void process_notify(Sal *sal, eXo
  		}
  	}
  	/*answer that we received the notify*/
@@ -1589,7 +1614,7 @@
  	osip_free(from);
  }
  
-@@ -1699,28 +2152,79 @@ static void call_message_new(Sal *sal, e
+@@ -1699,28 +2156,79 @@ static void call_message_new(Sal *sal, e
  				else {
  					ms_message("Unhandled SIP INFO.");
  					/*send an "Not implemented" answer*/
@@ -1672,7 +1697,7 @@
  		}else if(MSG_IS_REFER(ev->request)){
  			SalOp *op=find_op(sal,ev);
  			
-@@ -1729,13 +2233,29 @@ static void call_message_new(Sal *sal, e
+@@ -1729,13 +2237,29 @@ static void call_message_new(Sal *sal, e
  		}else if(MSG_IS_NOTIFY(ev->request)){
  			process_notify(sal,ev);
  		}else if (MSG_IS_OPTIONS(ev->request)){
@@ -1702,7 +1727,7 @@
  		}
  	}else ms_warning("call_message_new: No request ?");
  }
-@@ -1743,11 +2263,28 @@ static void call_message_new(Sal *sal, e
+@@ -1743,11 +2267,28 @@ static void call_message_new(Sal *sal, e
  static void inc_update(Sal *sal, eXosip_event_t *ev){
  	osip_message_t *msg=NULL;
  	ms_message("Processing incoming UPDATE");
@@ -1732,7 +1757,7 @@
  }
  
  static bool_t comes_from_local_if(osip_message_t *msg){
-@@ -1865,7 +2402,7 @@ static void text_received(Sal *sal, eXos
+@@ -1865,7 +2406,7 @@ static void text_received(Sal *sal, eXos
  	salmsg.message_id=message_id;
  	salmsg.time=date!=NULL ? mktime_utc(&ret) : time(NULL);
  	sal->callbacks.text_received(op,&salmsg);
@@ -1741,7 +1766,7 @@
  	osip_free(from);
  }
  
-@@ -1874,12 +2411,24 @@ static void other_request(Sal *sal, eXos
+@@ -1874,12 +2415,24 @@ static void other_request(Sal *sal, eXos
  	if (ev->request==NULL) return;
  	if (strcmp(ev->request->sip_method,"MESSAGE")==0){
  		text_received(sal,ev);
@@ -1766,7 +1791,7 @@
  	}else if (strncmp(ev->request->sip_method, "REFER", 5) == 0){
  		ms_message("Receiving REFER request !");
  		if (comes_from_local_if(ev->request)) {
-@@ -1896,7 +2445,11 @@ static void other_request(Sal *sal, eXos
+@@ -1896,7 +2449,11 @@ static void other_request(Sal *sal, eXos
  			osip_free(tmp);
  		}
  		/*answer with a 501 Not implemented*/
@@ -1778,7 +1803,7 @@
  	}
  }
  
-@@ -1959,7 +2512,7 @@ static bool_t fix_message_contact(SalOp
+@@ -1959,7 +2516,7 @@ static bool_t fix_message_contact(SalOp
  	return TRUE;    
  }
  
@@ -1787,7 +1812,7 @@
  	osip_contact_t *ctt=NULL;
  	SalAddress* ori_contact_address=NULL;
  	const char *received;
-@@ -2007,25 +2560,53 @@ static bool_t register_again_with_update
+@@ -2007,25 +2564,53 @@ static bool_t register_again_with_update
  		ms_message("Contact do not match, resending register.");
  	else return FALSE;
  
@@ -1841,7 +1866,7 @@
  	return FALSE;
  }
  
-@@ -2040,7 +2621,7 @@ static void registration_success(Sal *sa
+@@ -2040,7 +2625,7 @@ static void registration_success(Sal *sa
  	osip_message_get_expires(ev->request,0,&h);
  	if (h!=NULL && atoi(h->hvalue)!=0){
  		registered=TRUE;
@@ -1850,7 +1875,7 @@
  			sal->callbacks.register_success(op,registered);
  		}
  	}else {
-@@ -2078,10 +2659,26 @@ static bool_t registration_failure(Sal *
+@@ -2078,10 +2663,26 @@ static bool_t registration_failure(Sal *
  					if (val>op->expires)
  						op->expires=val;
  				}else op->expires*=2;
@@ -1877,7 +1902,7 @@
  			}
  		break;
  		case 606: /*Not acceptable, workaround for proxies that don't like private addresses
-@@ -2092,7 +2689,7 @@ static bool_t registration_failure(Sal *
+@@ -2092,7 +2693,7 @@ static bool_t registration_failure(Sal *
  		default:
  			/* if contact is up to date, process the failure, otherwise resend a new register with
  				updated contact first, just in case the faillure is due to incorrect contact */
@@ -1886,7 +1911,7 @@
  				return TRUE; /*we are retrying with an updated contact*/
  			if (status_code==403){
  				se=SalErrorFailure;
-@@ -2136,7 +2733,7 @@ static void process_in_call_reply(Sal *s
+@@ -2136,7 +2737,7 @@ static void process_in_call_reply(Sal *s
  	if (ev->response){
  		if (ev->request && strcmp(osip_message_get_method(ev->request),"NOTIFY")==0){
  			if (op->sipfrag_pending){
@@ -1895,7 +1920,7 @@
  				op->sipfrag_pending=NULL;
  			}
  		}
-@@ -2156,7 +2753,9 @@ static bool_t process_event(Sal *sal, eX
+@@ -2156,7 +2757,9 @@ static bool_t process_event(Sal *sal, eX
  			ms_message("CALL_CLOSED or CANCELLED\n");
  			call_terminated(sal,ev);
  			break;
@@ -1905,7 +1930,7 @@
  		case EXOSIP_CALL_NOANSWER:
  			ms_message("CALL_TIMEOUT or NOANSWER\n");
  			return call_failure(sal,ev);
-@@ -2184,7 +2783,11 @@ static bool_t process_event(Sal *sal, eX
+@@ -2184,7 +2787,11 @@ static bool_t process_event(Sal *sal, eX
  			break;
  		case EXOSIP_CALL_REDIRECTED:
  			ms_message("CALL_REDIRECTED");
@@ -1917,7 +1942,7 @@
  			break;
  		case EXOSIP_CALL_PROCEEDING:
  			ms_message("CALL_PROCEEDING");
-@@ -2213,13 +2816,17 @@ static bool_t process_event(Sal *sal, eX
+@@ -2213,13 +2820,17 @@ static bool_t process_event(Sal *sal, eX
  			ms_message("CALL_IN_SUBSCRIPTION_NEW ");
  			sal_exosip_subscription_recv(sal,ev);
  			break;
@@ -1935,7 +1960,7 @@
  		case EXOSIP_SUBSCRIPTION_NOTIFY:
  			ms_message("CALL_SUBSCRIPTION_NOTIFY");
  			sal_exosip_notify_recv(sal,ev);
-@@ -2228,10 +2835,12 @@ static bool_t process_event(Sal *sal, eX
+@@ -2228,10 +2839,12 @@ static bool_t process_event(Sal *sal, eX
  			ms_message("EXOSIP_SUBSCRIPTION_ANSWERED, ev->sid=%i, ev->did=%i\n",ev->sid,ev->did);
  			sal_exosip_subscription_answered(sal,ev);
  			break;
@@ -1948,7 +1973,7 @@
  		case EXOSIP_SUBSCRIPTION_REQUESTFAILURE:   /**< announce a request failure      */
  			if (ev->response && (ev->response->status_code == 407 || ev->response->status_code == 401)){
  				return process_authentication(sal,ev);
-@@ -2266,7 +2875,11 @@ static bool_t process_event(Sal *sal, eX
+@@ -2266,7 +2879,11 @@ static bool_t process_event(Sal *sal, eX
  					case 401:
  						return process_authentication(sal,ev);
  					case 412: {
@@ -1960,7 +1985,7 @@
  						return 1;
  					}
  				}
-@@ -2282,22 +2895,50 @@ static bool_t process_event(Sal *sal, eX
+@@ -2282,22 +2899,50 @@ static bool_t process_event(Sal *sal, eX
  
  int sal_iterate(Sal *sal){
  	eXosip_event_t *ev;
@@ -2011,7 +2036,7 @@
  	return 0;
  }
  
-@@ -2337,7 +2978,7 @@ void sal_message_add_route(osip_message_
+@@ -2337,7 +2982,7 @@ void sal_message_add_route(osip_message_
  }
  
  
@@ -2020,7 +2045,7 @@
  	osip_message_t *msg;
  	const char *contact=sal_op_get_contact(h);
  
-@@ -2361,31 +3002,60 @@ int sal_register(SalOp *h, const char *p
+@@ -2361,31 +3006,60 @@ int sal_register(SalOp *h, const char *p
  		}
  		if (uri) ms_free(uri);
  		sal_address_destroy(from_parsed);
@@ -2082,7 +2107,7 @@
  	osip_message_t *msg=NULL;
  	const char *contact=sal_op_get_contact(op);
  	
-@@ -2408,27 +3078,58 @@ int sal_register_refresh(SalOp *op, int
+@@ -2408,27 +3082,58 @@ int sal_register_refresh(SalOp *op, int
  			}
  		}
  	}
@@ -2144,7 +2169,7 @@
  	return 0;
  }
  
-@@ -2598,8 +3299,13 @@ void sal_set_keepalive_period(Sal *ctx,u
+@@ -2598,8 +3303,13 @@ void sal_set_keepalive_period(Sal *ctx,u
  		default:
  			break;
  	}
@@ -2158,7 +2183,7 @@
  unsigned int sal_get_keepalive_period(Sal *ctx) {
  	return ctx->keepalive_period;
  }
-@@ -2632,16 +3338,32 @@ void sal_address_set_transport(SalAddres
+@@ -2632,16 +3342,32 @@ void sal_address_set_transport(SalAddres
  }
  
  /* sends a reinvite. Local media description may have changed by application since call establishment*/
@@ -2192,7 +2217,7 @@
  	osip_message_set_subject(reinvite,subject);
  	osip_message_set_allow(reinvite, "INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO");
  	if (h->base.contact){
-@@ -2656,9 +3378,21 @@ int sal_call_update(SalOp *h, const char
+@@ -2656,9 +3382,21 @@ int sal_call_update(SalOp *h, const char
  		h->sdp_offering=TRUE;
  		set_sdp_from_desc(reinvite,h->base.local_media);
  	}else h->sdp_offering=FALSE;
@@ -2214,8 +2239,10 @@
  	return err;
  }
  
---- a/coreapi/sal_eXosip2.h
-+++ b/coreapi/sal_eXosip2.h
+Index: linphone-3.6.1/coreapi/sal_eXosip2.h
+===================================================================
+--- linphone-3.6.1.orig/coreapi/sal_eXosip2.h
++++ linphone-3.6.1/coreapi/sal_eXosip2.h
 @@ -53,6 +53,9 @@ struct Sal{
  	bool_t expire_old_contact;
  	bool_t add_dates;
@@ -2226,8 +2253,10 @@
  };
  
  struct SalOp{
---- a/coreapi/sal_eXosip2_presence.c
-+++ b/coreapi/sal_eXosip2_presence.c
+Index: linphone-3.6.1/coreapi/sal_eXosip2_presence.c
+===================================================================
+--- linphone-3.6.1.orig/coreapi/sal_eXosip2_presence.c
++++ linphone-3.6.1/coreapi/sal_eXosip2_presence.c
 @@ -17,6 +17,9 @@ along with this program; if not, write t
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
@@ -2625,8 +2654,10 @@
  		}
  	}else _sal_exosip_subscription_recv(sal,ev);
  }
---- a/coreapi/sal.h
-+++ b/coreapi/sal.h
+Index: linphone-3.6.1/coreapi/sal.h
+===================================================================
+--- linphone-3.6.1.orig/coreapi/sal.h
++++ linphone-3.6.1/coreapi/sal.h
 @@ -382,8 +382,8 @@ void sal_op_set_contact(SalOp *op, const
  void sal_op_set_route(SalOp *op, const char *route);
  void sal_op_set_from(SalOp *op, const char *from);
@@ -2715,8 +2746,10 @@
  
  
  
---- a/m4/exosip.m4
-+++ b/m4/exosip.m4
+Index: linphone-3.6.1/m4/exosip.m4
+===================================================================
+--- linphone-3.6.1.orig/m4/exosip.m4
++++ linphone-3.6.1/m4/exosip.m4
 @@ -13,64 +13,30 @@ case $host_alias in
  	;;
  esac

Reply via email to