Kaydet (Commit) 957bd581 authored tarafından Miklos Vajna's avatar Miklos Vajna

error: could not convert from 'void' to 'bool'

coverity#1202762 fix probably wanted to handle the result of
dbus_message_iter_init(), not the result of
dbus_message_iter_init_append()

Change-Id: I31de559b729421bace92b0a768cb218b072d7b4c
üst 59af5e5b
......@@ -769,12 +769,7 @@ setDBusBooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter,
DBusMessage *pMsg = pProperties->getMethodCall( "Set" );
DBusMessageIter itIn;
if(!dbus_message_iter_init_append( pMsg, &itIn ))
{
SAL_WARN( "sdremote.bluetooth", "error init dbus" );
}
else
{
dbus_message_iter_init_append( pMsg, &itIn );
const char* pInterface = "org.bluez.Adapter1";
dbus_message_iter_append_basic( &itIn, DBUS_TYPE_STRING, &pInterface );
dbus_message_iter_append_basic( &itIn, DBUS_TYPE_STRING, &pPropertyName );
......@@ -789,7 +784,7 @@ setDBusBooleanProperty( DBusConnection *pConnection, DBusObject *pAdapter,
}
pMsg = sendUnrefAndWaitForReply( pConnection, pMsg );
}
if( !pMsg )
{
SAL_WARN( "sdremote.bluetooth", "no valid reply / timeout" );
......@@ -917,8 +912,10 @@ DBusHandlerResult ProfileMessageFunction
}
DBusMessageIter it;
dbus_message_iter_init(pMessage, &it);
if (!dbus_message_iter_init(pMessage, &it))
SAL_WARN( "sdremote.bluetooth", "error init dbus" );
else
{
char* pPath;
dbus_message_iter_get_basic(&it, &pPath);
SAL_INFO("sdremote.bluetooth", "Adapter path:" << pPath);
......@@ -957,6 +954,7 @@ DBusHandlerResult ProfileMessageFunction
// bluetooth or normal network connection).
return DBUS_HANDLER_RESULT_HANDLED;
}
}
else if (OString(dbus_message_get_member(pMessage)).equals("RequestDisconnection"))
{
return DBUS_HANDLER_RESULT_HANDLED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment