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
24db5cdc
Commit
24db5cdc
authored
Oct 05, 2011
by
Tristan Matthews
Browse files
* #7097: cleanup, stripped dead code, removed shadowed-vars
Found with -Wshadow argument to g++
parent
6aceecc3
Changes
21
Show whitespace changes
Inline
Side-by-side
daemon/src/audio/alsa/alsalayer.cpp
View file @
24db5cdc
...
...
@@ -214,10 +214,10 @@ AlsaLayer::stopStream (void)
* return the function return value
*/
#define ALSA_CALL(call, error) ({ \
int err = call; \
if (err < 0) \
_error("ALSA: "error": %s", snd_strerror(err)); \
err; \
int err
_code
= call; \
if (err
_code
< 0) \
_error("ALSA: "error": %s", snd_strerror(err
_code
)); \
err
_code
; \
})
void
AlsaLayer
::
stopCaptureStream
(
void
)
...
...
daemon/src/config/yamlemitter.cpp
View file @
24db5cdc
...
...
@@ -374,7 +374,7 @@ void YamlEmitter::addMappingItem (int mappingid, std::string key, YamlNode *node
throw
;
}
}
else
if
(
node
->
getType
()
==
SEQUENCE
)
{
SequenceNode
*
seqnode
=
(
SequenceNode
*
)
node
;
SequenceNode
*
seqnode
=
static_cast
<
SequenceNode
*
>
(
node
)
;
if
(
(
temp1
=
yaml_document_add_scalar
(
&
document
,
NULL
,
(
yaml_char_t
*
)
key
.
c_str
(),
-
1
,
YAML_PLAIN_SCALAR_STYLE
))
==
0
)
throw
YamlEmitterException
(
"Could not add scalar to document"
);
...
...
@@ -387,25 +387,21 @@ void YamlEmitter::addMappingItem (int mappingid, std::string key, YamlNode *node
Sequence
*
seq
=
seqnode
->
getSequence
();
Sequence
::
const_iterator
it
;
for
(
it
=
seq
->
begin
();
it
!=
seq
->
end
();
++
it
)
{
YamlNode
*
n
ode
=
*
it
;
YamlNode
*
yamlN
ode
=
*
it
;
int
id
;
if
(
(
id
=
yaml_document_add_mapping
(
&
document
,
NULL
,
YAML_BLOCK_MAPPING_STYLE
))
==
0
)
{
if
((
id
=
yaml_document_add_mapping
(
&
document
,
NULL
,
YAML_BLOCK_MAPPING_STYLE
))
==
0
)
throw
YamlEmitterException
(
"Could not add account mapping to document"
);
}
if
(
yaml_document_append_sequence_item
(
&
document
,
temp2
,
id
)
==
0
)
{
if
(
yaml_document_append_sequence_item
(
&
document
,
temp2
,
id
)
==
0
)
throw
YamlEmitterException
(
"Could not append account mapping to sequence"
);
}
MappingNode
*
mapnode
=
(
MappingNode
*
)
n
ode
;
MappingNode
*
mapnode
=
static_cast
<
MappingNode
*
>
(
yamlN
ode
)
;
Mapping
*
map
=
mapnode
->
getMapping
();
Mapping
::
iterator
mapit
;
for
(
mapit
=
map
->
begin
();
mapit
!=
map
->
end
()
;
++
mapit
)
addMappingItem
(
id
,
mapit
->
first
,
mapit
->
second
);
}
}
else
{
}
else
throw
YamlEmitterException
(
"Unknown node type while adding mapping node"
);
}
}
}
daemon/src/config/yamlemitter.h
View file @
24db5cdc
...
...
@@ -131,7 +131,6 @@ class YamlEmitter
friend
class
ConfigurationTest
;
};
}
#endif
daemon/src/dbus/callmanager.h
View file @
24db5cdc
...
...
@@ -31,6 +31,7 @@
#ifndef __SFL_CALLMANAGER_H__
#define __SFL_CALLMANAGER_H__
#include
"dbus_cpp.h"
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
/* This warning option only exists for gcc 4.6.0 and greater. */
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
...
...
@@ -47,7 +48,6 @@
#pragma GCC diagnostic warning "-Wunused-but-set-variable"
#endif
#include
<dbus-c++/dbus.h>
#include
<stdexcept>
class
CallManagerException
:
public
std
::
runtime_error
...
...
daemon/src/dbus/configurationmanager.h
View file @
24db5cdc
...
...
@@ -48,7 +48,7 @@
#pragma GCC diagnostic warning "-Wunused-but-set-variable"
#endif
#include
<
dbus
-c++/dbus
.h
>
#include
"
dbus
_cpp
.h
"
class
ConfigurationManager
:
public
org
::
sflphone
::
SFLphone
::
ConfigurationManager_adaptor
,
...
...
daemon/src/dbus/dbusmanager.h
View file @
24db5cdc
...
...
@@ -31,11 +31,8 @@
#ifndef __DBUSMANAGERIMPL_H__
#define __DBUSMANAGERIMPL_H__
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#include
<dbus-c++/dbus.h>
#pragma GCC diagnostic warning "-Wignored-qualifiers"
#pragma GCC diagnostic warning "-Wunused-parameter"
#include
"dbus_cpp.h"
class
ConfigurationManager
;
class
CallManager
;
class
NetworkManager
;
...
...
daemon/src/dbus/instance.cpp
View file @
24db5cdc
...
...
@@ -27,8 +27,8 @@
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#include
<
global.h
>
#include
<
instance.h
>
#include
"
global.h
"
#include
"
instance.h
"
#include
"../manager.h"
Instance
::
Instance
(
DBus
::
Connection
&
connection
)
...
...
daemon/src/dbus/instance.h
View file @
24db5cdc
...
...
@@ -34,6 +34,7 @@
#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 6
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#include
"dbus_cpp.h"
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
#pragma GCC diagnostic ignored "-Wunused-parameter"
...
...
@@ -44,9 +45,6 @@
#pragma GCC diagnostic warning "-Wunused-but-set-variable"
#endif
#include
<dbus-c++/dbus.h>
class
Instance
:
public
org
::
sflphone
::
SFLphone
::
Instance_adaptor
,
public
DBus
::
IntrospectableAdaptor
,
...
...
daemon/src/dbus/networkmanager.cpp
View file @
24db5cdc
...
...
@@ -28,10 +28,12 @@
* as that of the covered work.
*/
#include
<global.h>
#include
"networkmanager.h"
#include
<iostream>
#include
<instance.h>
#include
"global.h"
#include
"instance.h"
#include
"../manager.h"
const
std
::
string
NetworkManager
::
statesString
[
5
]
=
{
"unknown"
,
"asleep"
,
"connecting"
,
"connected"
,
"disconnected"
};
...
...
@@ -55,6 +57,6 @@ void NetworkManager::PropertiesChanged (const std::map< std::string, ::DBus::Var
Manager
::
instance
().
registerAccounts
();
}
NetworkManager
::
NetworkManager
(
DBus
::
Connection
&
connection
,
const
DBus
::
Path
&
path
,
const
char
*
destination
)
:
DBus
::
ObjectProxy
(
connection
,
path
,
destination
)
NetworkManager
::
NetworkManager
(
DBus
::
Connection
&
connection
,
const
DBus
::
Path
&
dbus_
path
,
const
char
*
destination
)
:
DBus
::
ObjectProxy
(
connection
,
dbus_
path
,
destination
)
{
}
daemon/src/dbus/networkmanager_proxy.h
View file @
24db5cdc
...
...
@@ -6,8 +6,7 @@
#ifndef __dbusxx__networkmanager_proxy_h__PROXY_MARSHAL_H
#define __dbusxx__networkmanager_proxy_h__PROXY_MARSHAL_H
#include
<dbus-c++/dbus.h>
#include
<cassert>
#include
"dbus_cpp.h"
namespace
org
{
...
...
daemon/src/hooks/urlhook.cpp
View file @
24db5cdc
...
...
@@ -31,13 +31,13 @@
#include
"urlhook.h"
#include
<cstdlib>
void
UrlHook
::
runAction
(
std
::
string
command
,
std
::
string
args
)
int
UrlHook
::
runAction
(
const
std
::
string
&
command
,
const
std
::
string
&
args
)
{
if
(
args
.
empty
())
return
;
return
0
;
//FIXME : use fork and execve, so no need to escape shell arguments
std
::
string
cmd
=
command
+
"
\"
"
+
args
+
"
\"
&"
;
system
(
cmd
.
c_str
());
return
system
(
cmd
.
c_str
());
}
daemon/src/hooks/urlhook.h
View file @
24db5cdc
...
...
@@ -33,10 +33,8 @@
#include
<string>
class
UrlHook
namespace
UrlHook
{
public:
static
void
runAction
(
std
::
string
,
std
::
string
);
};
int
runAction
(
const
std
::
string
&
command
,
const
std
::
string
&
arg
);
}
#endif // URL_HOOK_H
daemon/src/iax/iaxcall.cpp
View file @
24db5cdc
...
...
@@ -57,16 +57,16 @@ IAXCall::getSupportedFormat (const std::string &accountID) const
{
Account
*
account
=
Manager
::
instance
().
getAccount
(
accountID
);
int
format
=
0
;
int
format
_mask
=
0
;
if
(
account
)
{
CodecOrder
map
(
account
->
getActiveCodecs
());
for
(
CodecOrder
::
const_iterator
iter
=
map
.
begin
();
iter
!=
map
.
end
();
++
iter
)
format
|=
codecToASTFormat
(
*
iter
);
format
_mask
|=
codecToASTFormat
(
*
iter
);
}
else
_error
(
"No IAx account could be found"
);
return
format
;
return
format
_mask
;
}
int
IAXCall
::
getFirstMatchingFormat
(
int
needles
,
const
std
::
string
&
accountID
)
const
...
...
@@ -76,10 +76,10 @@ int IAXCall::getFirstMatchingFormat (int needles, const std::string &accountID)
if
(
account
!=
NULL
)
{
CodecOrder
map
(
account
->
getActiveCodecs
());
for
(
CodecOrder
::
const_iterator
iter
=
map
.
begin
();
iter
!=
map
.
end
();
++
iter
)
{
int
format
=
codecToASTFormat
(
*
iter
);
int
format
_mask
=
codecToASTFormat
(
*
iter
);
// Return the first that matches
if
(
format
&
needles
)
return
format
;
if
(
format
_mask
&
needles
)
return
format
_mask
;
}
}
else
_error
(
"No IAx account could be found"
);
...
...
daemon/src/iax/iaxvoiplink.cpp
View file @
24db5cdc
...
...
@@ -86,8 +86,8 @@ IAXVoIPLink::terminate()
for
(
CallMap
::
iterator
iter
=
_callMap
.
begin
();
iter
!=
_callMap
.
end
();
++
iter
)
{
IAXCall
*
call
=
dynamic_cast
<
IAXCall
*>
(
iter
->
second
);
if
(
call
)
{
ost
::
MutexLock
m
(
mutexIAX_
);
iax_hangup
(
call
->
session
,
(
char
*
)
"Dumped Call"
);
ost
::
MutexLock
lock
(
mutexIAX_
);
iax_hangup
(
call
->
session
,
const_cast
<
char
*
>
(
"Dumped Call"
)
)
;
delete
call
;
}
}
...
...
daemon/src/sip/SdesNegotiator.h
View file @
24db5cdc
...
...
@@ -93,52 +93,52 @@ class CryptoAttribute
{
public:
CryptoAttribute
(
std
::
string
tag
,
std
::
string
cryptoSuite
,
std
::
string
srtpKeyMethod
,
std
::
string
srtpKeyInfo
,
std
::
string
lifetime
,
std
::
string
mkiValue
,
std
::
string
mkiLength
)
:
tag
(
tag
),
cryptoSuite
(
cryptoSuite
),
srtpKeyMethod
(
srtpKeyMethod
),
srtpKeyInfo
(
srtpKeyInfo
),
lifetime
(
lifetime
),
mkiValue
(
mkiValue
),
mkiLength
(
mkiLength
)
{}
;
CryptoAttribute
(
const
std
::
string
&
tag
,
const
std
::
string
&
cryptoSuite
,
const
std
::
string
&
srtpKeyMethod
,
const
std
::
string
&
srtpKeyInfo
,
const
std
::
string
&
lifetime
,
const
std
::
string
&
mkiValue
,
const
std
::
string
&
mkiLength
)
:
tag
_
(
tag
),
cryptoSuite
_
(
cryptoSuite
),
srtpKeyMethod
_
(
srtpKeyMethod
),
srtpKeyInfo
_
(
srtpKeyInfo
),
lifetime
_
(
lifetime
),
mkiValue
_
(
mkiValue
),
mkiLength
_
(
mkiLength
)
{}
std
::
string
getTag
()
const
{
return
tag
;
}
;
return
tag
_
;
}
std
::
string
getCryptoSuite
()
const
{
return
cryptoSuite
;
}
;
return
cryptoSuite
_
;
}
std
::
string
getSrtpKeyMethod
()
const
{
return
srtpKeyMethod
;
}
;
return
srtpKeyMethod
_
;
}
std
::
string
getSrtpKeyInfo
()
const
{
return
srtpKeyInfo
;
}
;
return
srtpKeyInfo
_
;
}
std
::
string
getLifetime
()
const
{
return
lifetime
;
}
;
return
lifetime
_
;
}
std
::
string
getMkiValue
()
const
{
return
mkiValue
;
}
;
return
mkiValue
_
;
}
std
::
string
getMkiLength
()
const
{
return
mkiLength
;
}
;
return
mkiLength
_
;
}
private:
std
::
string
tag
;
std
::
string
cryptoSuite
;
std
::
string
srtpKeyMethod
;
std
::
string
srtpKeyInfo
;
std
::
string
lifetime
;
std
::
string
mkiValue
;
std
::
string
mkiLength
;
std
::
string
tag
_
;
std
::
string
cryptoSuite
_
;
std
::
string
srtpKeyMethod
_
;
std
::
string
srtpKeyInfo
_
;
std
::
string
lifetime
_
;
std
::
string
mkiValue
_
;
std
::
string
mkiLength
_
;
};
class
SdesNegotiator
...
...
@@ -156,7 +156,7 @@ class SdesNegotiator
public:
SdesNegotiator
(
const
std
::
vector
<
CryptoSuiteDefinition
>&
localCapabilites
,
const
std
::
vector
<
std
::
string
>&
remoteAttribute
);
~
SdesNegotiator
()
{
};
~
SdesNegotiator
()
{};
bool
negotiate
(
void
);
...
...
daemon/src/sip/sipaccount.cpp
View file @
24db5cdc
...
...
@@ -40,7 +40,7 @@
SIPAccount
::
SIPAccount
(
const
std
::
string
&
accountID
)
:
Account
(
accountID
,
"SIP"
)
,
transport
(
NULL
)
,
transport
_
(
NULL
)
,
regc_
(
NULL
)
,
bRegister_
(
false
)
,
registrationExpire_
(
600
)
...
...
@@ -298,11 +298,11 @@ void SIPAccount::unserialize (Conf::MappingNode *map)
cred
->
getValue
(
USERNAME
,
&
user
);
cred
->
getValue
(
PASSWORD
,
&
pass
);
cred
->
getValue
(
REALM
,
&
realm
);
std
::
map
<
std
::
string
,
std
::
string
>
m
ap
;
m
ap
[
USERNAME
]
=
user
;
m
ap
[
PASSWORD
]
=
pass
;
m
ap
[
REALM
]
=
realm
;
creds
.
push_back
(
m
ap
);
std
::
map
<
std
::
string
,
std
::
string
>
credentialM
ap
;
credentialM
ap
[
USERNAME
]
=
user
;
credentialM
ap
[
PASSWORD
]
=
pass
;
credentialM
ap
[
REALM
]
=
realm
;
creds
.
push_back
(
credentialM
ap
);
}
}
if
(
creds
.
empty
())
{
...
...
@@ -656,10 +656,10 @@ std::string SIPAccount::getLoginName (void)
std
::
string
SIPAccount
::
getFromUri
(
void
)
const
{
std
::
string
scheme
(
""
)
;
std
::
string
transport
(
""
)
;
std
::
string
username
=
username_
;
std
::
string
hostname
=
hostname_
;
std
::
string
scheme
;
std
::
string
transport
;
std
::
string
username
(
username_
)
;
std
::
string
hostname
(
hostname_
)
;
// UDP does not require the transport specification
if
(
transportType_
==
PJSIP_TRANSPORT_TLS
)
{
...
...
daemon/src/sip/sipaccount.h
View file @
24db5cdc
...
...
@@ -408,8 +408,7 @@ class SIPAccount : public Account
return
zrtpHelloHash_
;
}
pjsip_transport
*
transport
;
pjsip_transport
*
transport_
;
private:
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>
>
credentials_
;
...
...
daemon/src/sip/sipvoiplink.cpp
View file @
24db5cdc
...
...
@@ -288,7 +288,7 @@ void SIPVoIPLink::sendRegister (Account *a)
std
::
string
srvUri
(
account
->
getServerUri
());
std
::
string
address
,
port
;
findLocalAddressFromUri
(
srvUri
,
account
->
transport
,
address
,
port
);
findLocalAddressFromUri
(
srvUri
,
account
->
transport
_
,
address
,
port
);
std
::
string
from
(
account
->
getFromUri
());
pj_str_t
pjFrom
=
pj_str
((
char
*
)
from
.
c_str
());
...
...
@@ -320,11 +320,11 @@ void SIPVoIPLink::sendRegister (Account *a)
if
(
pjsip_regc_register
(
regc
,
PJ_TRUE
,
&
tdata
)
!=
PJ_SUCCESS
)
throw
VoipLinkException
(
"Unable to initialize transaction data for account registration"
);
if
(
pjsip_regc_set_transport
(
regc
,
initTransportSelector
(
account
->
transport
,
_pool
))
!=
PJ_SUCCESS
)
if
(
pjsip_regc_set_transport
(
regc
,
initTransportSelector
(
account
->
transport
_
,
_pool
))
!=
PJ_SUCCESS
)
throw
VoipLinkException
(
"Unable to set transport"
);
// decrease transport's ref count, counter incrementation is managed when acquiring transport
pjsip_transport_dec_ref
(
account
->
transport
);
pjsip_transport_dec_ref
(
account
->
transport
_
);
// pjsip_regc_send increment the transport ref count by one,
if
(
pjsip_regc_send
(
regc
,
tdata
)
!=
PJ_SUCCESS
)
...
...
@@ -333,7 +333,7 @@ void SIPVoIPLink::sendRegister (Account *a)
// Decrease transport's ref count, since coresponding reference counter decrementation
// is performed in pjsip_regc_destroy. This function is never called in SFLphone as the
// regc data structure is permanently associated to the account at first registration.
pjsip_transport_dec_ref
(
account
->
transport
);
pjsip_transport_dec_ref
(
account
->
transport
_
);
account
->
setRegistrationInfo
(
regc
);
}
...
...
@@ -753,7 +753,7 @@ SIPVoIPLink::SIPStartCall(SIPCall *call)
std
::
string
toUri
(
call
->
getPeerNumber
());
// expecting a fully well formed sip uri
std
::
string
address
,
port
;
findLocalAddressFromUri
(
toUri
,
account
->
transport
,
address
,
port
);
findLocalAddressFromUri
(
toUri
,
account
->
transport
_
,
address
,
port
);
std
::
string
from
(
account
->
getFromUri
());
pj_str_t
pjFrom
=
pj_str
((
char
*
)
from
.
c_str
());
...
...
@@ -782,7 +782,7 @@ SIPVoIPLink::SIPStartCall(SIPCall *call)
if
(
pjsip_inv_invite
(
call
->
inv
,
&
tdata
)
!=
PJ_SUCCESS
)
return
false
;
pjsip_tpselector
*
tp
=
initTransportSelector
(
account
->
transport
,
call
->
inv
->
pool
);
pjsip_tpselector
*
tp
=
initTransportSelector
(
account
->
transport
_
,
call
->
inv
->
pool
);
if
(
pjsip_dlg_set_transport
(
dialog
,
tp
)
!=
PJ_SUCCESS
)
return
false
;
...
...
@@ -882,7 +882,7 @@ bool SIPVoIPLink::SIPNewIpToIpCall (const std::string& id, const std::string& to
shutdownSipTransport
(
account
);
createTlsTransport
(
account
,
remoteAddr
);
if
(
!
account
->
transport
)
{
if
(
!
account
->
transport
_
)
{
delete
call
;
return
false
;
}
...
...
@@ -951,9 +951,9 @@ void SIPVoIPLink::createDefaultSipUdpTransport()
{
SIPAccount
*
account
=
dynamic_cast
<
SIPAccount
*>
(
Manager
::
instance
().
getAccount
(
IP2IP_PROFILE
));
createUdpTransport
(
account
);
assert
(
account
->
transport
);
assert
(
account
->
transport
_
);
_localUDPTransport
=
account
->
transport
;
_localUDPTransport
=
account
->
transport
_
;
}
void
SIPVoIPLink
::
createTlsListener
(
SIPAccount
*
account
,
pjsip_tpfactory
**
listener
)
...
...
@@ -987,7 +987,7 @@ void SIPVoIPLink::createTlsTransport (SIPAccount *account, std::string remoteAdd
if
(
localTlsListener
==
NULL
)
createTlsListener
(
account
,
&
localTlsListener
);
pjsip_endpt_acquire_transport
(
_endpt
,
PJSIP_TRANSPORT_TLS
,
&
rem_addr
,
sizeof
(
rem_addr
),
NULL
,
&
account
->
transport
);
pjsip_endpt_acquire_transport
(
_endpt
,
PJSIP_TRANSPORT_TLS
,
&
rem_addr
,
sizeof
(
rem_addr
),
NULL
,
&
account
->
transport
_
);
}
...
...
@@ -1007,13 +1007,13 @@ void SIPVoIPLink::createSipTransport (SIPAccount *account)
else
createUdpTransport
(
account
);
if
(
!
account
->
transport
)
{
if
(
!
account
->
transport
_
)
{
// Could not create new transport, this transport may already exists
account
->
transport
=
transportMap_
[
account
->
getLocalPort
()];
if
(
account
->
transport
)
{
pjsip_transport_add_ref
(
account
->
transport
);
}
else
{
account
->
transport
=
_localUDPTransport
;
account
->
transport
_
=
transportMap_
[
account
->
getLocalPort
()];
if
(
account
->
transport
_
)
pjsip_transport_add_ref
(
account
->
transport
_
);
else
{
account
->
transport
_
=
_localUDPTransport
;
account
->
setLocalPort
(
_localUDPTransport
->
local_name
.
port
);
}
}
...
...
@@ -1054,11 +1054,11 @@ void SIPVoIPLink::createUdpTransport (SIPAccount *account)
listeningPort
};
pjsip_udp_transport_start
(
_endpt
,
&
bound_addr
,
&
a_name
,
1
,
&
account
->
transport
);
pjsip_udp_transport_start
(
_endpt
,
&
bound_addr
,
&
a_name
,
1
,
&
account
->
transport
_
);
pjsip_tpmgr_dump_transports
(
pjsip_endpt_get_tpmgr
(
_endpt
));
// dump debug information to stdout
if
(
account
->
transport
)
transportMap_
[
account
->
getLocalPort
()]
=
account
->
transport
;
if
(
account
->
transport
_
)
transportMap_
[
account
->
getLocalPort
()]
=
account
->
transport
_
;
}
pjsip_tpselector
*
SIPVoIPLink
::
initTransportSelector
(
pjsip_transport
*
transport
,
pj_pool_t
*
tp_pool
)
...
...
@@ -1113,7 +1113,7 @@ void SIPVoIPLink::createStunTransport (SIPAccount *account)
account
->
setPublishedAddress
(
listeningAddress
);
account
->
setPublishedPort
(
a_name
.
port
);
pjsip_udp_transport_attach2
(
_endpt
,
PJSIP_TRANSPORT_UDP
,
sock
,
&
a_name
,
1
,
&
account
->
transport
);
pjsip_udp_transport_attach2
(
_endpt
,
PJSIP_TRANSPORT_UDP
,
sock
,
&
a_name
,
1
,
&
account
->
transport
_
);
pjsip_tpmgr_dump_transports
(
pjsip_endpt_get_tpmgr
(
_endpt
));
}
...
...
@@ -1121,9 +1121,9 @@ void SIPVoIPLink::createStunTransport (SIPAccount *account)
void
SIPVoIPLink
::
shutdownSipTransport
(
SIPAccount
*
account
)
{
if
(
account
->
transport
)
{
pjsip_transport_dec_ref
(
account
->
transport
);
account
->
transport
=
NULL
;
if
(
account
->
transport
_
)
{
pjsip_transport_dec_ref
(
account
->
transport
_
);
account
->
transport
_
=
NULL
;
}
}
...
...
@@ -1508,8 +1508,8 @@ void transaction_state_changed_cb (pjsip_inv_session *inv UNUSED, pjsip_transact
Manager
::
instance
().
incomingMessage
(
call
->
getCallId
(),
from
,
module
->
findTextMessage
(
formatedMessage
));
}
catch
(
sfl
::
InstantMessageException
&
e
)
{
_error
(
"SipVoipLink: %s"
,
e
.
what
());
}
catch
(
const
sfl
::
InstantMessageException
&
e
xcept
)
{
_error
(
"SipVoipLink: %s"
,
e
xcept
.
what
());
}
}
...
...
@@ -1673,7 +1673,7 @@ static pj_bool_t transaction_request_cb (pjsip_rx_data *rdata)
?
account
->
getPublishedAddress
()
:
addrToUse
;
pjsip_tpselector
*
tp
=
SIPVoIPLink
::
instance
()
->
initTransportSelector
(
account
->
transport
,
call
->
getMemoryPool
());
pjsip_tpselector
*
tp
=
SIPVoIPLink
::
instance
()
->
initTransportSelector
(
account
->
transport
_
,
call
->
getMemoryPool
());
if
(
addrToUse
==
"0.0.0.0"
)
addrToUse
=
loadSIPLocalIP
();
...
...
daemon/test/Makefile.am
View file @
24db5cdc
...
...
@@ -24,8 +24,6 @@ test_SOURCES = \
configurationtest.cpp
\
historytest.h
\
historytest.cpp
\
hookmanagertest.h
\
hookmanagertest.cpp
\
numbercleanertest.h
\
numbercleanertest.cpp
\
pluginmanagertest.h
\
...
...
@@ -52,7 +50,6 @@ test_SOURCES = \
echocanceltest.h
\
gaincontroltest.h
\
historytest.h
\
hookmanagertest.h
\
instantmessagingtest.h
\
mainbuffertest.h
\
numbercleanertest.h
\
...
...
daemon/test/hookmanagertest.cpp
deleted
100644 → 0
View file @
6aceecc3
/*
* Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Savoir-Faire Linux Inc.
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* Additional permission under GNU GPL version 3 section 7:
*
* If you modify this program, or any covered work, by linking or
* combining it with the OpenSSL project's OpenSSL library (or a
* modified version of that library), containing parts covered by the
* terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
* grants you additional permission to convey the resulting work.
* Corresponding Source for a non-source form of such a combination
* shall include the source code for the parts of OpenSSL used as well
* as that of the covered work.
*/
#include
<stdio.h>
#include
<sstream>
#include
<dlfcn.h>
#include
"global.h"
#include
"hookmanagertest.h"
using
std
::
cout
;
using
std
::
endl
;