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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
e2a285e7
Commit
e2a285e7
authored
15 years ago
by
Alexandre Savard
Browse files
Options
Downloads
Patches
Plain Diff
[#3648] Fix display name in configuration unserialization
parent
3ec5795a
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
sflphone-common/sequence2.yml
+3
-0
3 additions, 0 deletions
sflphone-common/sequence2.yml
sflphone-common/src/sip/sipaccount.cpp
+34
-30
34 additions, 30 deletions
sflphone-common/src/sip/sipaccount.cpp
sflphone-common/src/sip/sipaccount.h
+2
-0
2 additions, 0 deletions
sflphone-common/src/sip/sipaccount.h
with
39 additions
and
30 deletions
sflphone-common/sequence2.yml
+
3
−
0
View file @
e2a285e7
...
@@ -17,6 +17,7 @@ accounts:
...
@@ -17,6 +17,7 @@ accounts:
codecs
:
0/9/110/111/112/
codecs
:
0/9/110/111/112/
stunServer
:
stun.sflphone.org
stunServer
:
stun.sflphone.org
stunEnabled
:
false
stunEnabled
:
false
displayName
:
Alexandre Savard
credential
:
credential
:
count
:
0
count
:
0
srtp
:
srtp
:
...
@@ -61,6 +62,7 @@ accounts:
...
@@ -61,6 +62,7 @@ accounts:
codecs
:
0/9/110/111/112/
codecs
:
0/9/110/111/112/
stunServer
:
stun.sflphone.org
stunServer
:
stun.sflphone.org
stunEnabled
:
false
stunEnabled
:
false
displayName
:
Alexandre Savard
credential
:
credential
:
count
:
0
count
:
0
srtp
:
srtp
:
...
@@ -105,6 +107,7 @@ accounts:
...
@@ -105,6 +107,7 @@ accounts:
codecs
:
0/9/110/111/112/
codecs
:
0/9/110/111/112/
stunServer
:
stun.sflphone.org
stunServer
:
stun.sflphone.org
stunEnabled
:
false
stunEnabled
:
false
displayName
:
Alexandre Savard
credential
:
credential
:
count
:
0
count
:
0
srtp
:
srtp
:
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sip/sipaccount.cpp
+
34
−
30
View file @
e2a285e7
...
@@ -199,6 +199,9 @@ void SIPAccount::unserialize(Conf::MappingNode *map)
...
@@ -199,6 +199,9 @@ void SIPAccount::unserialize(Conf::MappingNode *map)
credMap
=
(
Conf
::
MappingNode
*
)(
map
->
getValue
(
credKey
));
credMap
=
(
Conf
::
MappingNode
*
)(
map
->
getValue
(
credKey
));
credentials
.
unserialize
(
credMap
);
credentials
.
unserialize
(
credMap
);
val
=
(
Conf
::
ScalarNode
*
)(
map
->
getValue
(
displayNameKey
));
if
(
val
)
{
_displayName
=
val
->
getValue
();
val
=
NULL
;
}
// get srtp submap
// get srtp submap
srtpMap
=
(
Conf
::
MappingNode
*
)(
map
->
getValue
(
srtpKey
));
srtpMap
=
(
Conf
::
MappingNode
*
)(
map
->
getValue
(
srtpKey
));
if
(
!
srtpMap
)
if
(
!
srtpMap
)
...
@@ -457,8 +460,9 @@ void SIPAccount::initTlsConfiguration (void)
...
@@ -457,8 +460,9 @@ void SIPAccount::initTlsConfiguration (void)
}
}
// TLS listener is unique and should be only modified through IP2IP_PROFILE
// TLS listener is unique and should be only modified through IP2IP_PROFILE
std
::
string
tlsPortStr
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_LISTENER_PORT
);
// std::string tlsPortStr = Manager::instance().getConfigString(_accountID, TLS_LISTENER_PORT);
setTlsListenerPort
(
atoi
(
tlsPortStr
.
c_str
()));
// setTlsListenerPort(atoi(tlsPortStr.c_str()));
setTlsListenerPort
(
atoi
(
_tlsPortStr
.
c_str
()));
_tlsSetting
=
(
pjsip_tls_setting
*
)
malloc
(
sizeof
(
pjsip_tls_setting
));
_tlsSetting
=
(
pjsip_tls_setting
*
)
malloc
(
sizeof
(
pjsip_tls_setting
));
...
@@ -466,33 +470,33 @@ void SIPAccount::initTlsConfiguration (void)
...
@@ -466,33 +470,33 @@ void SIPAccount::initTlsConfiguration (void)
pjsip_tls_setting_default
(
_tlsSetting
);
pjsip_tls_setting_default
(
_tlsSetting
);
std
::
string
tlsCaListFile
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_CA_LIST_FILE
);
//
std::string tlsCaListFile = Manager::instance().getConfigString (_accountID, TLS_CA_LIST_FILE);
std
::
string
tlsCertificateFile
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_CERTIFICATE_FILE
);
//
std::string tlsCertificateFile = Manager::instance().getConfigString (_accountID, TLS_CERTIFICATE_FILE);
std
::
string
tlsPrivateKeyFile
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_PRIVATE_KEY_FILE
);
//
std::string tlsPrivateKeyFile = Manager::instance().getConfigString (_accountID, TLS_PRIVATE_KEY_FILE);
std
::
string
tlsPassword
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_PASSWORD
);
//
std::string tlsPassword = Manager::instance().getConfigString (_accountID, TLS_PASSWORD);
std
::
string
tlsMethod
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_METHOD
);
//
std::string tlsMethod = Manager::instance().getConfigString (_accountID, TLS_METHOD);
std
::
string
tlsCiphers
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_CIPHERS
);
//
std::string tlsCiphers = Manager::instance().getConfigString (_accountID, TLS_CIPHERS);
std
::
string
tlsServerName
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_SERVER_NAME
);
//
std::string tlsServerName = Manager::instance().getConfigString (_accountID, TLS_SERVER_NAME);
bool
tlsVerifyServer
=
Manager
::
instance
().
getConfigBool
(
_accountID
,
TLS_VERIFY_SERVER
);
//
bool tlsVerifyServer = Manager::instance().getConfigBool (_accountID, TLS_VERIFY_SERVER);
bool
tlsVerifyClient
=
Manager
::
instance
().
getConfigBool
(
_accountID
,
TLS_VERIFY_CLIENT
);
//
bool tlsVerifyClient = Manager::instance().getConfigBool (_accountID, TLS_VERIFY_CLIENT);
bool
tlsRequireClientCertificate
=
Manager
::
instance
().
getConfigBool
(
_accountID
,
TLS_REQUIRE_CLIENT_CERTIFICATE
);
//
bool tlsRequireClientCertificate = Manager::instance().getConfigBool (_accountID, TLS_REQUIRE_CLIENT_CERTIFICATE);
std
::
string
tlsNegotiationTimeoutSec
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_NEGOTIATION_TIMEOUT_SEC
);
//
std::string tlsNegotiationTimeoutSec = Manager::instance().getConfigString (_accountID, TLS_NEGOTIATION_TIMEOUT_SEC);
std
::
string
tlsNegotiationTimeoutMsec
=
Manager
::
instance
().
getConfigString
(
_accountID
,
TLS_NEGOTIATION_TIMEOUT_MSEC
);
//
std::string tlsNegotiationTimeoutMsec = Manager::instance().getConfigString (_accountID, TLS_NEGOTIATION_TIMEOUT_MSEC);
pj_cstr
(
&
_tlsSetting
->
ca_list_file
,
tlsCaListFile
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
ca_list_file
,
_
tlsCaListFile
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
cert_file
,
tlsCertificateFile
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
cert_file
,
_
tlsCertificateFile
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
privkey_file
,
tlsPrivateKeyFile
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
privkey_file
,
_
tlsPrivateKeyFile
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
password
,
tlsPassword
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
password
,
_
tlsPassword
.
c_str
());
_tlsSetting
->
method
=
sslMethodStringToPjEnum
(
tlsMethod
);
_tlsSetting
->
method
=
sslMethodStringToPjEnum
(
_
tlsMethod
);
pj_cstr
(
&
_tlsSetting
->
ciphers
,
tlsCiphers
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
ciphers
,
_
tlsCiphers
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
server_name
,
tlsServerName
.
c_str
());
pj_cstr
(
&
_tlsSetting
->
server_name
,
_
tlsServerName
.
c_str
());
_tlsSetting
->
verify_server
=
(
tlsVerifyServer
==
true
)
?
PJ_TRUE
:
PJ_FALSE
;
_tlsSetting
->
verify_server
=
(
_
tlsVerifyServer
==
true
)
?
PJ_TRUE
:
PJ_FALSE
;
_tlsSetting
->
verify_client
=
(
tlsVerifyClient
==
true
)
?
PJ_TRUE
:
PJ_FALSE
;
_tlsSetting
->
verify_client
=
(
_
tlsVerifyClient
==
true
)
?
PJ_TRUE
:
PJ_FALSE
;
_tlsSetting
->
require_client_cert
=
(
tlsRequireClientCertificate
==
true
)
?
PJ_TRUE
:
PJ_FALSE
;
_tlsSetting
->
require_client_cert
=
(
_
tlsRequireClientCertificate
==
true
)
?
PJ_TRUE
:
PJ_FALSE
;
_tlsSetting
->
timeout
.
sec
=
atol
(
tlsNegotiationTimeoutSec
.
c_str
());
_tlsSetting
->
timeout
.
sec
=
atol
(
_
tlsNegotiationTimeoutSec
.
c_str
());
_tlsSetting
->
timeout
.
msec
=
atol
(
tlsNegotiationTimeoutMsec
.
c_str
());
_tlsSetting
->
timeout
.
msec
=
atol
(
_
tlsNegotiationTimeoutMsec
.
c_str
());
}
}
...
@@ -762,7 +766,7 @@ std::string SIPAccount::getContactHeader (const std::string& address, const std:
...
@@ -762,7 +766,7 @@ std::string SIPAccount::getContactHeader (const std::string& address, const std:
transport
=
""
;
transport
=
""
;
}
}
_displayName
=
Manager
::
instance
().
getConfigString
(
_accountID
,
DISPLAY_NAME
);
//
_displayName = Manager::instance().getConfigString (_accountID, DISPLAY_NAME);
_debug
(
"Display Name: %s"
,
_displayName
.
c_str
());
_debug
(
"Display Name: %s"
,
_displayName
.
c_str
());
...
...
This diff is collapsed.
Click to expand it.
sflphone-common/src/sip/sipaccount.h
+
2
−
0
View file @
e2a285e7
...
@@ -96,6 +96,8 @@ const Conf::Key stunServerKey("stunServer");
...
@@ -96,6 +96,8 @@ const Conf::Key stunServerKey("stunServer");
const
Conf
::
Key
credKey
(
"credential"
);
const
Conf
::
Key
credKey
(
"credential"
);
const
Conf
::
Key
credentialCountKey
(
"count"
);
const
Conf
::
Key
credentialCountKey
(
"count"
);
const
Conf
::
Key
displayNameKey
(
"displayName"
);
class
SIPVoIPLink
;
class
SIPVoIPLink
;
/**
/**
...
...
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