fix liblinphone-tester for android

This commit is contained in:
Simon Morlat 2013-06-19 14:49:07 +02:00
parent 9633a35601
commit 0c4216948d
2 changed files with 8 additions and 1 deletions

View file

@ -8,6 +8,7 @@ common_SRC_FILES := \
register_tester.c \
setup_tester.c \
upnp_tester.c \
eventapi_tester.c
# neon

View file

@ -96,6 +96,8 @@ static LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char*
char ringbackpath[256]={0};
char rootcapath[256]={0};
char dnsuserhostspath[256]={0};
if (path==NULL) path=".";
if (path && file){
sprintf(filepath, "%s/%s", path, file);
@ -105,7 +107,11 @@ static LinphoneCore* configure_lc_from(LinphoneCoreVTable* v_table, const char*
lc = linphone_core_new(v_table,NULL,*filepath!='\0' ? filepath : NULL,NULL);
if (path){
sprintf(rootcapath, "%s/certificates/cacert.pem", path);
#ifndef ANDROID
snprintf(rootcapath, sizeof(rootcapath), "%s/certificates/cacert.pem", path);
#else
snprintf(rootcapath, sizeof(rootcapath), "%s/cacert.pem", path);
#endif
linphone_core_set_root_ca(lc,rootcapath);
sprintf(dnsuserhostspath, "%s/%s", path, userhostsfile);