Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
e2ec6d96
Commit
e2ec6d96
authored
10 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
sipaccount: fix pointer to deinitialised local variable
Refs #71790 Change-Id: Ica542e01c1f6a4d8305b3653923ed6a0078e6e41
parent
ac4ce3f4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sip/sipaccount.cpp
+6
-12
6 additions, 12 deletions
src/sip/sipaccount.cpp
with
6 additions
and
12 deletions
src/sip/sipaccount.cpp
+
6
−
12
View file @
e2ec6d96
...
@@ -1653,25 +1653,19 @@ void SIPAccount::setCredentials(const std::vector<std::map<std::string, std::str
...
@@ -1653,25 +1653,19 @@ void SIPAccount::setCredentials(const std::vector<std::map<std::string, std::str
size_t
i
=
0
;
size_t
i
=
0
;
for
(
const
auto
&
item
:
credentials_
)
{
for
(
const
auto
&
item
:
credentials_
)
{
map
<
string
,
string
>::
const_iterator
val
=
item
.
find
(
Conf
::
CONFIG_ACCOUNT_PASSWORD
);
auto
val
=
item
.
find
(
Conf
::
CONFIG_ACCOUNT_USERNAME
);
const
std
::
string
password
=
val
!=
item
.
end
()
?
val
->
second
:
""
;
int
dataType
=
(
md5HashingEnabled
and
password
.
length
()
==
32
)
?
PJSIP_CRED_DATA_DIGEST
:
PJSIP_CRED_DATA_PLAIN_PASSWD
;
val
=
item
.
find
(
Conf
::
CONFIG_ACCOUNT_USERNAME
);
if
(
val
!=
item
.
end
())
if
(
val
!=
item
.
end
())
cred_
[
i
].
username
=
pj_str
((
char
*
)
val
->
second
.
c_str
());
cred_
[
i
].
username
=
pj_str
((
char
*
)
val
->
second
.
c_str
());
cred_
[
i
].
data
=
pj_str
((
char
*
)
password
.
c_str
());
val
=
item
.
find
(
Conf
::
CONFIG_ACCOUNT_REALM
);
val
=
item
.
find
(
Conf
::
CONFIG_ACCOUNT_REALM
);
if
(
val
!=
item
.
end
())
if
(
val
!=
item
.
end
())
cred_
[
i
].
realm
=
pj_str
((
char
*
)
val
->
second
.
c_str
());
cred_
[
i
].
realm
=
pj_str
((
char
*
)
val
->
second
.
c_str
());
cred_
[
i
].
data_type
=
dataType
;
val
=
item
.
find
(
Conf
::
CONFIG_ACCOUNT_PASSWORD
);
cred_
[
i
].
data
=
pj_str
((
char
*
)
(
val
!=
item
.
end
()
?
val
->
second
.
c_str
()
:
""
));
cred_
[
i
].
data_type
=
(
md5HashingEnabled
and
cred_
[
i
].
data
.
slen
==
32
)
?
PJSIP_CRED_DATA_DIGEST
:
PJSIP_CRED_DATA_PLAIN_PASSWD
;
cred_
[
i
].
scheme
=
pj_str
((
char
*
)
"digest"
);
cred_
[
i
].
scheme
=
pj_str
((
char
*
)
"digest"
);
++
i
;
++
i
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment