summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Lorenz <jlorenz@de.adit-jv.com>2017-04-11 21:52:38 +0200
committerJens Lorenz <jlorenz@de.adit-jv.com>2017-04-11 22:20:10 +0200
commit3bd66bf4c57c03c2004a8f60234cd60f791c81b9 (patch)
treebbbb0bd15dfcd1eff4e34075ae8d6dcc2d52c21e
parentb0196808d2164d282c434b92fe5db34078f1a80e (diff)
downloadaudiomanager-3bd66bf4c57c03c2004a8f60234cd60f791c81b9.tar.gz
AMUtil: Only add active DBus watch FDs to socket handler
Signed-off-by: Jens Lorenz <jlorenz@de.adit-jv.com>
-rw-r--r--AudioManagerUtilities/src/CAmDbusWrapper.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/AudioManagerUtilities/src/CAmDbusWrapper.cpp b/AudioManagerUtilities/src/CAmDbusWrapper.cpp
index b87d3a5..1f1d5a6 100644
--- a/AudioManagerUtilities/src/CAmDbusWrapper.cpp
+++ b/AudioManagerUtilities/src/CAmDbusWrapper.cpp
@@ -293,18 +293,18 @@ dbus_bool_t CAmDbusWrapper::addWatchDelegate(DBusWatch * watch, void* userData)
event |= POLLIN;
if (flags & DBUS_WATCH_WRITABLE)
event |= POLLOUT;
- }
- logInfo("DBusWrapper::addWatchDelegate entered new watch, fd=", dbus_watch_get_unix_fd(watch), "event flag=", event);
- am_Error_e error = mpSocketHandler->addFDPoll(dbus_watch_get_unix_fd(watch), event, &pDbusPrepareCallback, &pDbusFireCallback, &pDbusCheckCallback, &pDbusDispatchCallback, watch, handle);
+ logInfo("DBusWrapper::addWatchDelegate entered new watch, fd=", dbus_watch_get_unix_fd(watch), "event flag=", event);
+ am_Error_e error = mpSocketHandler->addFDPoll(dbus_watch_get_unix_fd(watch), event, &pDbusPrepareCallback, &pDbusFireCallback, &pDbusCheckCallback, &pDbusDispatchCallback, watch, handle);
- //if everything is alright, add the watch and the handle to our map so we know this relationship
- if (error == E_OK && handle != 0)
- {
- mMapHandleWatch.insert(std::make_pair(watch, handle));
- return (true);
+ //if everything is alright, add the watch and the handle to our map so we know this relationship
+ if (error == E_OK && handle != 0)
+ {
+ mMapHandleWatch.insert(std::make_pair(watch, handle));
+ return (true);
+ }
+ logError("DBusWrapper::addWatchDelegate entering watch failed");
}
- logError("DBusWrapper::addWatchDelegate entering watch failed");
return (true);
}