X-Git-Url: http://git.maemo.org/git/?p=vicar;a=blobdiff_plain;f=src%2Fvicar-telepathy%2Fsrc%2Fconnection.cpp;h=c4dbfb40ada4eba2d281ca97e6cbe94fac329e77;hp=236ded55bcc48d5b6d4fc377bda39ba6abfb865c;hb=5e3ee6e03bc18e941eb99dc5b7f9cfde7ff86a51;hpb=11d5c26f3a622a0fc32f9cb89e1658846201af4d diff --git a/src/vicar-telepathy/src/connection.cpp b/src/vicar-telepathy/src/connection.cpp index 236ded5..c4dbfb4 100644 --- a/src/vicar-telepathy/src/connection.cpp +++ b/src/vicar-telepathy/src/connection.cpp @@ -441,6 +441,18 @@ QDBusObjectPath Connection::processChannel(const QVariantMap &request){ return channel_path; } + //Only allow requests with handle type as contact + QVariant vTargetHandleType = request.value("org.freedesktop.Telepathy.Channel.TargetHandleType"); + uint intTargetHandleType = vTargetHandleType.toUInt(); + if (intTargetHandleType != HandleContact) + { + QString strMessage = "VICaR - Supports handles of type Contact only. Recieved handle type "; + strMessage.append(vTargetHandleType.toString()); + + sendErrorReply("org.freedesktop.Telepathy.Error.InvalidArgument", + strMessage); + } + /* Send an error reply to Tp Client (Mission Control) to force it to close the active channel. Once it recieves the reply, the client does not bother what we return.