Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
5b5bdb71
Commit
5b5bdb71
authored
Nov 18, 2019
by
Sylvain Berfini
🐮
Browse files
Fixes for account creator
parent
8f5cba14
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
113 additions
and
38 deletions
+113
-38
coreapi/account_creator.c
coreapi/account_creator.c
+104
-35
coreapi/lpconfig.c
coreapi/lpconfig.c
+3
-3
tester/account_creator_tester.c
tester/account_creator_tester.c
+6
-0
No files found.
coreapi/account_creator.c
View file @
5b5bdb71
This diff is collapsed.
Click to expand it.
coreapi/lpconfig.c
View file @
5b5bdb71
...
@@ -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
);
...
...
tester/account_creator_tester.c
View file @
5b5bdb71
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment