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
cd9c2c4e
Commit
cd9c2c4e
authored
Oct 15, 2012
by
Simon Morlat
Browse files
fix bug in file config parser preventing to reset values.
parent
30032453
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
coreapi/lpconfig.c
coreapi/lpconfig.c
+3
-3
No files found.
coreapi/lpconfig.c
View file @
cd9c2c4e
...
...
@@ -184,10 +184,10 @@ void lp_config_parse(LpConfig *lpconfig, FILE *file){
if
(
pos2
==
NULL
)
pos2
=
pos1
+
strlen
(
pos1
);
else
{
*
pos2
=
'\0'
;
/*replace the '\n' */
pos2
--
;
}
/* remove ending white spaces */
for
(;
pos2
>
pos1
&&
*
pos2
==
' '
;
pos2
--
)
*
pos2
=
'\0'
;
for
(;
pos2
>
pos1
&&
pos2
[
-
1
]
==
' '
;
pos2
--
)
pos2
[
-
1
]
=
'\0'
;
if
(
pos2
-
pos1
>=
0
){
/* found a pair key,value */
if
(
cur
!=
NULL
){
...
...
@@ -198,7 +198,7 @@ void lp_config_parse(LpConfig *lpconfig, FILE *file){
ms_free
(
item
->
value
);
item
->
value
=
strdup
(
pos1
);
}
/*printf("Found %s %s=%s\n",cur->name,key,pos1);*/
/*printf("Found %s %s=
{
%s
}
\n",cur->name,key,pos1);*/
}
else
{
ms_warning
(
"found key,item but no sections"
);
}
...
...
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