Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
e1392dde
Commit
e1392dde
authored
Aug 29, 2011
by
Tristan Matthews
Browse files
* #6554: make some methods of sipvoiplink static
parent
1055619b
Changes
3
Hide whitespace changes
Inline
Side-by-side
daemon/src/dbus/configurationmanager.cpp
View file @
e1392dde
...
...
@@ -425,17 +425,17 @@ void ConfigurationManager::setHistory (const std::vector<std::string>& entries)
std
::
string
ConfigurationManager
::
getAddrFromInterfaceName
(
const
std
::
string
&
interface
)
{
return
SIPVoIPLink
::
instance
()
->
getInterfaceAddrFromName
(
interface
);
return
SIPVoIPLink
::
getInterfaceAddrFromName
(
interface
);
}
std
::
vector
<
std
::
string
>
ConfigurationManager
::
getAllIpInterface
(
void
)
{
return
SIPVoIPLink
::
instance
()
->
getAllIpInterface
();
return
SIPVoIPLink
::
getAllIpInterface
();
}
std
::
vector
<
std
::
string
>
ConfigurationManager
::
getAllIpInterfaceByName
(
void
)
{
return
SIPVoIPLink
::
instance
()
->
getAllIpInterfaceByName
();
return
SIPVoIPLink
::
getAllIpInterfaceByName
();
}
std
::
map
<
std
::
string
,
std
::
string
>
ConfigurationManager
::
getShortcuts
()
...
...
daemon/src/sip/sipvoiplink.cpp
View file @
e1392dde
...
...
@@ -3398,7 +3398,7 @@ static int get_iface_list (struct ifconf *ifconf)
}
}
// end anonymous namespace
std
::
vector
<
std
::
string
>
SIPVoIPLink
::
getAllIpInterfaceByName
(
void
)
const
std
::
vector
<
std
::
string
>
SIPVoIPLink
::
getAllIpInterfaceByName
(
void
)
{
static
ifreq
ifreqs
[
20
];
ifconf
ifconf
;
...
...
@@ -3426,7 +3426,7 @@ std::vector<std::string> SIPVoIPLink::getAllIpInterfaceByName (void) const
return
ifaceList
;
}
std
::
string
SIPVoIPLink
::
getInterfaceAddrFromName
(
const
std
::
string
&
ifaceName
)
const
std
::
string
SIPVoIPLink
::
getInterfaceAddrFromName
(
const
std
::
string
&
ifaceName
)
{
int
fd
=
socket
(
AF_INET
,
SOCK_DGRAM
,
0
);
if
(
fd
<
0
)
{
...
...
@@ -3435,8 +3435,8 @@ std::string SIPVoIPLink::getInterfaceAddrFromName (const std::string &ifaceName)
}
ifreq
ifr
;
memset
(
&
ifr
,
0
,
sizeof
(
ifreq
));
strcpy
(
ifr
.
ifr_name
,
ifaceName
.
c_str
());
memset
(
&
ifr
,
0
,
sizeof
(
ifreq
));
strcpy
(
ifr
.
ifr_name
,
ifaceName
.
c_str
());
ifr
.
ifr_addr
.
sa_family
=
AF_INET
;
if
(
ioctl
(
fd
,
SIOCGIFADDR
,
&
ifr
)
<
0
)
...
...
@@ -3450,7 +3450,7 @@ std::string SIPVoIPLink::getInterfaceAddrFromName (const std::string &ifaceName)
return
addr
;
}
std
::
vector
<
std
::
string
>
SIPVoIPLink
::
getAllIpInterface
(
void
)
const
std
::
vector
<
std
::
string
>
SIPVoIPLink
::
getAllIpInterface
(
void
)
{
pj_sockaddr
addrList
[
16
];
unsigned
int
addrCnt
=
PJ_ARRAY_SIZE
(
addrList
);
...
...
daemon/src/sip/sipvoiplink.h
View file @
e1392dde
...
...
@@ -254,7 +254,7 @@ class SIPVoIPLink : public VoIPLink
* of IPV4 address available on all of the interfaces on
* the system.
*/
std
::
vector
<
std
::
string
>
getAllIpInterface
(
void
)
const
;
static
std
::
vector
<
std
::
string
>
getAllIpInterface
(
void
);
/**
* List all the interfaces on the system and return
...
...
@@ -264,7 +264,7 @@ class SIPVoIPLink : public VoIPLink
* of interface name available on all of the interfaces on
* the system.
*/
std
::
vector
<
std
::
string
>
getAllIpInterfaceByName
(
void
)
const
;
static
std
::
vector
<
std
::
string
>
getAllIpInterfaceByName
(
void
);
/**
* List all the interfaces on the system and return
...
...
@@ -274,7 +274,7 @@ class SIPVoIPLink : public VoIPLink
* of interface name available on all of the interfaces on
* the system.
*/
std
::
string
getInterfaceAddrFromName
(
const
std
::
string
&
ifaceName
)
const
;
static
std
::
string
getInterfaceAddrFromName
(
const
std
::
string
&
ifaceName
);
/**
* Initialize the transport selector
...
...
Write
Preview
Supports
Markdown
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