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
df19ab8e
Commit
df19ab8e
authored
15 years ago
by
Emmanuel Milou
Browse files
Options
Downloads
Patches
Plain Diff
[#1400] Make the match with the hostname instead of username
parent
200db686
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
sflphone-common/src/managerimpl.cpp
+2
-2
2 additions, 2 deletions
sflphone-common/src/managerimpl.cpp
sflphone-common/src/sipaccount.cpp
+6
-1
6 additions, 1 deletion
sflphone-common/src/sipaccount.cpp
sflphone-common/src/sipaccount.h
+1
-0
1 addition, 0 deletions
sflphone-common/src/sipaccount.h
with
9 additions
and
3 deletions
sflphone-common/src/managerimpl.cpp
+
2
−
2
View file @
df19ab8e
...
@@ -2507,11 +2507,11 @@ ManagerImpl::getAccountIdFromNameAndServer(const std::string& userName, const st
...
@@ -2507,11 +2507,11 @@ ManagerImpl::getAccountIdFromNameAndServer(const std::string& userName, const st
}
}
}
}
// We failed! Then only match the
user
name
// We failed! Then only match the
host
name
for
(
iter
=
_accountMap
.
begin
();
iter
!=
_accountMap
.
end
();
++
iter
)
{
for
(
iter
=
_accountMap
.
begin
();
iter
!=
_accountMap
.
end
();
++
iter
)
{
account
=
dynamic_cast
<
SIPAccount
*>
(
iter
->
second
);
account
=
dynamic_cast
<
SIPAccount
*>
(
iter
->
second
);
if
(
account
!=
NULL
)
{
if
(
account
!=
NULL
)
{
if
(
account
->
user
Match
(
u
ser
Name
))
if
(
account
->
hostname
Match
(
ser
ver
))
return
iter
->
first
;
return
iter
->
first
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sipaccount.cpp
+
6
−
1
View file @
df19ab8e
...
@@ -87,7 +87,7 @@ void SIPAccount::loadConfig()
...
@@ -87,7 +87,7 @@ void SIPAccount::loadConfig()
bool
SIPAccount
::
fullMatch
(
const
std
::
string
&
username
,
const
std
::
string
&
hostname
)
bool
SIPAccount
::
fullMatch
(
const
std
::
string
&
username
,
const
std
::
string
&
hostname
)
{
{
return
(
user
name
==
getU
sername
(
)
&&
hostname
==
getH
ostname
(
));
return
(
user
Match
(
u
sername
)
&&
hostname
Match
(
h
ostname
));
}
}
bool
SIPAccount
::
userMatch
(
const
std
::
string
&
username
)
bool
SIPAccount
::
userMatch
(
const
std
::
string
&
username
)
...
@@ -95,3 +95,8 @@ bool SIPAccount::userMatch(const std::string& username)
...
@@ -95,3 +95,8 @@ bool SIPAccount::userMatch(const std::string& username)
return
(
username
==
getUsername
());
return
(
username
==
getUsername
());
}
}
bool
SIPAccount
::
hostnameMatch
(
const
std
::
string
&
hostname
)
{
return
(
hostname
==
getHostname
());
}
This diff is collapsed.
Click to expand it.
sflphone-common/src/sipaccount.h
+
1
−
0
View file @
df19ab8e
...
@@ -76,6 +76,7 @@ class SIPAccount : public Account
...
@@ -76,6 +76,7 @@ class SIPAccount : public Account
bool
fullMatch
(
const
std
::
string
&
username
,
const
std
::
string
&
hostname
);
bool
fullMatch
(
const
std
::
string
&
username
,
const
std
::
string
&
hostname
);
bool
userMatch
(
const
std
::
string
&
username
);
bool
userMatch
(
const
std
::
string
&
username
);
bool
hostnameMatch
(
const
std
::
string
&
hostname
);
pjsip_regc
*
getRegistrationInfo
(
void
)
{
return
_regc
;
}
pjsip_regc
*
getRegistrationInfo
(
void
)
{
return
_regc
;
}
void
setRegistrationInfo
(
pjsip_regc
*
regc
)
{
_regc
=
regc
;
}
void
setRegistrationInfo
(
pjsip_regc
*
regc
)
{
_regc
=
regc
;
}
...
...
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