Commit 5b5bdb71 authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Fixes for account creator

parent 8f5cba14
This diff is collapsed.
...@@ -219,9 +219,9 @@ static int is_a_comment(const char *str){ ...@@ -219,9 +219,9 @@ static int is_a_comment(const char *str){
LpSection *linphone_config_find_section(const LpConfig *lpconfig, const char *name){ LpSection *linphone_config_find_section(const LpConfig *lpconfig, const char *name){
LpSection *sec; LpSection *sec;
bctbx_list_t *elem; bctbx_list_t *elem = lpconfig->sections;
/*printf("Looking for section %s\n",name);*/ /*printf("Looking for section %s\n",name);*/
for (elem=lpconfig->sections;elem!=NULL;elem=bctbx_list_next(elem)){ for (;elem!=NULL;elem=bctbx_list_next(elem)){
sec=(LpSection*)elem->data; sec=(LpSection*)elem->data;
if (strcmp(sec->name,name)==0){ if (strcmp(sec->name,name)==0){
/*printf("Section %s found\n",name);*/ /*printf("Section %s found\n",name);*/
...@@ -752,7 +752,7 @@ bool_t linphone_config_get_skip_flag_for_section(const LpConfig *lpconfig, const ...@@ -752,7 +752,7 @@ bool_t linphone_config_get_skip_flag_for_section(const LpConfig *lpconfig, const
} }
void linphone_config_set_string(LpConfig *lpconfig,const char *section, const char *key, const char *value){ void linphone_config_set_string(LpConfig *lpconfig,const char *section, const char *key, const char *value){
LpItem *item; LpItem *item;
LpSection *sec=linphone_config_find_section(lpconfig,section); LpSection *sec=linphone_config_find_section(lpconfig,section);
if (sec!=NULL){ if (sec!=NULL){
item=lp_section_find_item(sec,key); item=lp_section_find_item(sec,key);
......
...@@ -304,6 +304,12 @@ static void local_country_code_invalid(void) { ...@@ -304,6 +304,12 @@ static void local_country_code_invalid(void) {
LinphoneAccountCreatorPhoneNumberStatus, LinphoneAccountCreatorPhoneNumberStatus,
"%i"); "%i");
BC_ASSERT_EQUAL(
linphone_account_creator_set_phone_number(creator, "0123", "+")&LinphoneAccountCreatorPhoneNumberStatusInvalidCountryCode,
LinphoneAccountCreatorPhoneNumberStatusInvalidCountryCode,
LinphoneAccountCreatorPhoneNumberStatus,
"%i");
linphone_account_creator_unref(creator); linphone_account_creator_unref(creator);
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
} }
......
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