Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Bluedevil
Commits
edccd9cb
Commit
edccd9cb
authored
Jan 19, 2014
by
Àlex Fiestas
Browse files
Remove ObexSession from m_sessionMap when the object is destroyed
BUG: 308324
parent
71a08b93
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/daemon/obexftpkded/ObexFtpDaemon.cpp
View file @
edccd9cb
...
...
@@ -181,6 +181,7 @@ void ObexFtpDaemon::stablishConnection(QString dirtyAddress)
QDBusPendingReply
<
QDBusObjectPath
>
rep
=
d
->
m_manager
->
CreateBluetoothSession
(
address
,
"00:00:00:00:00:00"
,
"ftp"
);
d
->
m_sessionMap
[
address
]
=
new
ObexSession
(
"org.openobex"
,
rep
.
value
().
path
(),
QDBusConnection
::
sessionBus
(),
0
);
connect
(
d
->
m_sessionMap
[
address
],
SIGNAL
(
destroyed
(
QObject
*
)),
SLOT
(
sessionDestroyed
(
QObject
*
)));
kDebug
(
dobex
())
<<
"Path: "
<<
rep
.
value
().
path
();
}
...
...
@@ -374,6 +375,11 @@ void ObexFtpDaemon::sessionDisconnected()
delete
session
;
}
void
ObexFtpDaemon
::
sessionDestroyed
(
QObject
*
obj
)
{
d
->
m_sessionMap
.
remove
(
d
->
m_sessionMap
.
key
(
static_cast
<
ObexSession
*>
(
obj
)));
}
QString
ObexFtpDaemon
::
getAddressFromSession
(
QString
path
)
{
kDebug
(
dobex
())
<<
path
;
...
...
src/daemon/obexftpkded/ObexFtpDaemon.h
View file @
edccd9cb
...
...
@@ -80,6 +80,7 @@ private Q_SLOTS:
void
SessionClosed
(
QDBusObjectPath
path
);
void
sessionDisconnected
();
void
sessionDestroyed
(
QObject
*
obj
);
//Dbus interface
public
Q_SLOTS
:
...
...
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