summaryrefslogtreecommitdiff
path: root/PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp
diff options
context:
space:
mode:
authorchristian mueller <christian.ei.mueller@bmw.de>2012-04-18 14:37:36 +0200
committerchristian mueller <christian.ei.mueller@bmw.de>2012-05-24 13:40:22 +0200
commita74d588f039b4d7b583de5b4be108c98bd242642 (patch)
tree10e4772bdda715eb9ee19479687e839239d40244 /PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp
parent96d72c5be3cd6fab92914aa0eb076263a382eb95 (diff)
downloadaudiomanager-a74d588f039b4d7b583de5b4be108c98bd242642.tar.gz
* changes for enabling the demo @AMM
Signed-off-by: christian mueller <christian.ei.mueller@bmw.de>
Diffstat (limited to 'PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp')
-rw-r--r--PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp b/PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp
index 0f02ab3..cca1cd7 100644
--- a/PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp
+++ b/PluginRoutingInterfaceDbus/src/CAmDbusSend.cpp
@@ -116,25 +116,17 @@ void CAmRoutingDbusSend::append(am_SoundProperty_s soundProperty)
am_Error_e CAmRoutingDbusSend::send()
{
- am_Error_e error;
+ int16_t error;
DBusMessage* reply(dbus_connection_send_with_reply_and_block(mpDbusConnection, mpDbusMessage, -1, &mDBusError));
if (!reply)
{
log(&routingDbus, DLT_LOG_ERROR, "CAmRoutingDbusSend::send failed, dbus error", mDBusError.message);
return (E_UNKNOWN);
}
- if (!dbus_message_iter_init(reply, &mDbusMessageIter))
- {
- log(&routingDbus, DLT_LOG_ERROR, "DBusMessageHandler::send DBus Message has no arguments!");
- }
- if (DBUS_TYPE_INT16 != dbus_message_iter_get_arg_type(&mDbusMessageIter))
- {
- log(&routingDbus, DLT_LOG_ERROR, "DBusMessageHandler::getBool DBUS handler argument is no error!");
- }
- else
- {
- dbus_message_iter_get_basic(&mDbusMessageIter, &error);
- }
- return (error);
+ if(!dbus_message_get_args(reply, &mDBusError, //
+ DBUS_TYPE_INT16, &error, //
+ DBUS_TYPE_INVALID))
+ return (E_UNKNOWN);
+ return (static_cast<am_Error_e>(error));
}
}