Commit 3033fe35 authored by Simon Morlat's avatar Simon Morlat
Browse files

Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone

parents 6306a86b 79c0f2aa
...@@ -462,6 +462,15 @@ AC_SUBST(ORTP_LIBS) ...@@ -462,6 +462,15 @@ AC_SUBST(ORTP_LIBS)
AC_SUBST([ORTP_VERSION]) AC_SUBST([ORTP_VERSION])
AC_SUBST([ORTP_DIR]) AC_SUBST([ORTP_DIR])
AC_ARG_ENABLE(tests_enabled,
[ --disable-tests Disable compilation of tests],
[case "${enableval}" in
yes) tests_enabled=true ;;
no) tests_enabled=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-tests) ;;
esac],[tests_enabled=false])
AM_CONDITIONAL(ENABLE_TESTS, test x$tests_enabled = xyes)
dnl ################################################## dnl ##################################################
dnl # Check for doxygen dnl # Check for doxygen
dnl ################################################## dnl ##################################################
......
...@@ -50,6 +50,7 @@ if BUILD_WIN32 ...@@ -50,6 +50,7 @@ if BUILD_WIN32
liblinphone_la_LIBADD+=$(top_builddir)/oRTP/src/libortp.la liblinphone_la_LIBADD+=$(top_builddir)/oRTP/src/libortp.la
endif endif
if ENABLE_TESTS
noinst_PROGRAMS=test_lsd test_ecc noinst_PROGRAMS=test_lsd test_ecc
test_lsd_SOURCES=test_lsd.c test_lsd_SOURCES=test_lsd.c
...@@ -59,7 +60,7 @@ test_lsd_LDADD=liblinphone.la $(liblinphone_la_LIBADD) ...@@ -59,7 +60,7 @@ test_lsd_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
test_ecc_SOURCES=test_ecc.c test_ecc_SOURCES=test_ecc.c
test_ecc_LDADD=liblinphone.la $(liblinphone_la_LIBADD) test_ecc_LDADD=liblinphone.la $(liblinphone_la_LIBADD)
endif
AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \ AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \
......
...@@ -32,6 +32,7 @@ endif ...@@ -32,6 +32,7 @@ endif
clean-local: clean-local:
rm -rf doc rm -rf doc
if ENABLE_TESTS
#tutorials #tutorials
noinst_PROGRAMS=helloworld registration buddy_status chatroom noinst_PROGRAMS=helloworld registration buddy_status chatroom
...@@ -57,6 +58,7 @@ chatroom_SOURCES=chatroom.c ...@@ -57,6 +58,7 @@ chatroom_SOURCES=chatroom.c
LINPHONE_TUTOS+=$(chatroom_SOURCES) LINPHONE_TUTOS+=$(chatroom_SOURCES)
chatroom_LDADD=$(helloworld_LDADD) chatroom_LDADD=$(helloworld_LDADD)
endif
......
...@@ -41,17 +41,14 @@ static MSWebCam *get_nowebcam_device(){ ...@@ -41,17 +41,14 @@ static MSWebCam *get_nowebcam_device(){
} }
#endif #endif
static const char* get_zrtp_identifier(LinphoneCore *lc){ static const char* get_hexa_zrtp_identifier(LinphoneCore *lc){
const char *confZid=lp_config_get_string(lc->config,"rtp","zid",NULL); const char *confZid=lp_config_get_string(lc->config,"rtp","zid",NULL);
if (confZid != NULL) { if (confZid != NULL) {
return confZid; return confZid;
} else { } else {
int32_t *zid=calloc(3,32); char zidstr[128];
int i=0; snprintf(zidstr,sizeof(zidstr),"%x-%x-%x",rand(),rand(),rand());
for(;i<3;i++) { lp_config_set_string(lc->config,"rtp","zid",zidstr);
zid[i]=rand();
}
lp_config_set_string(lc->config,"rtp","zid",(char*)zid);
return lp_config_get_string(lc->config,"rtp","zid",NULL); return lp_config_get_string(lc->config,"rtp","zid",NULL);
} }
} }
...@@ -123,7 +120,7 @@ static void linphone_call_audiostream_encryption_changed(void *data, bool_t encr ...@@ -123,7 +120,7 @@ static void linphone_call_audiostream_encryption_changed(void *data, bool_t encr
if (params->has_video) { if (params->has_video) {
ms_message("Trying to enable encryption on video stream"); ms_message("Trying to enable encryption on video stream");
OrtpZrtpParams params; OrtpZrtpParams params;
params.zid=get_zrtp_identifier(call->core); params.zid=get_hexa_zrtp_identifier(call->core);
params.zid_file=NULL; //unused params.zid_file=NULL; //unused
video_stream_enable_zrtp(call->videostream,call->audiostream,&params); video_stream_enable_zrtp(call->videostream,call->audiostream,&params);
} }
...@@ -1130,7 +1127,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut ...@@ -1130,7 +1127,7 @@ void linphone_call_start_media_streams(LinphoneCall *call, bool_t all_inputs_mut
if (ortp_zrtp_available()) { if (ortp_zrtp_available()) {
OrtpZrtpParams params; OrtpZrtpParams params;
params.zid=get_zrtp_identifier(lc); params.zid=get_hexa_zrtp_identifier(lc);
params.zid_file=lc->zrtp_secrets_cache; params.zid_file=lc->zrtp_secrets_cache;
audio_stream_enable_zrtp(call->audiostream,&params); audio_stream_enable_zrtp(call->audiostream,&params);
} }
......
...@@ -641,7 +641,7 @@ static const char *codec_pref_order[]={ ...@@ -641,7 +641,7 @@ static const char *codec_pref_order[]={
"gsm", "gsm",
"pcmu", "pcmu",
"pcma", "pcma",
"VP8-DRAFT-0-3-2" "VP8-DRAFT-0-3-2",
"H264", "H264",
"MP4V-ES", "MP4V-ES",
"H263-1998", "H263-1998",
......
...@@ -1769,6 +1769,22 @@ static bool_t registration_failure(Sal *sal, eXosip_event_t *ev){ ...@@ -1769,6 +1769,22 @@ static bool_t registration_failure(Sal *sal, eXosip_event_t *ev){
case 407: case 407:
return process_authentication(sal,ev); return process_authentication(sal,ev);
break; break;
case 423: /*interval too brief*/
{/*retry with greater interval */
osip_header_t *h=NULL;
osip_message_t *msg=NULL;
osip_message_header_get_byname(ev->response,"min-expires",0,&h);
if (h && h->hvalue && h->hvalue[0]!='\0'){
int val=atoi(h->hvalue);
if (val>op->expires)
op->expires=val;
}else op->expires*=2;
eXosip_lock();
eXosip_register_build_register(op->rid,op->expires,&msg);
eXosip_register_send_register(op->rid,msg);
eXosip_unlock();
}
break;
case 606: /*Not acceptable, workaround for proxies that don't like private addresses case 606: /*Not acceptable, workaround for proxies that don't like private addresses
in vias, such as ekiga.net in vias, such as ekiga.net
On the opposite, freephonie.net bugs when via are masqueraded. On the opposite, freephonie.net bugs when via are masqueraded.
......
mediastreamer2 @ 45067312
Subproject commit c8dfa2124e35196d8c58d94a4cc9dea80849e8c2 Subproject commit 45067312fd5296d01ea66c851a0f87f9a993b52b
oRTP @ e1610232
Subproject commit 6eabe8e0490f3c88becfaf403444bb1285edde9d Subproject commit e16102322baf5bc6079216c44722f79d1a6202d4
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