X-Git-Url: http://git.maemo.org/git/?p=vicar;a=blobdiff_plain;f=src%2Fvicar-telepathy%2Fsrc%2Fconnection.cpp;h=c45810db3637add3ef89f5265f7f880ca4f06815;hp=c4dbfb40ada4eba2d281ca97e6cbe94fac329e77;hb=053b913299000a8ebbd4b14a0caa32ff7baab1b1;hpb=5e3ee6e03bc18e941eb99dc5b7f9cfde7ff86a51 diff --git a/src/vicar-telepathy/src/connection.cpp b/src/vicar-telepathy/src/connection.cpp index c4dbfb4..c45810d 100644 --- a/src/vicar-telepathy/src/connection.cpp +++ b/src/vicar-telepathy/src/connection.cpp @@ -1,5 +1,5 @@ /* -@version: 0.5 +@version: 0.6 @author: Sudheer K. @license: GNU General Public License @@ -440,6 +440,14 @@ QDBusObjectPath Connection::processChannel(const QVariantMap &request){ "VICaR - Invalid request. Phone Number is empty."); return channel_path; } + else if (strNumber == "publish" || strNumber == "subscribe"){ + //Deny the persistent Mission control requests to publish and subscribe + QString strError = "VICaR - Invalid request. " + strNumber + " is not supported."; + sendErrorReply("org.freedesktop.Telepathy.Error.InvalidArgument", + strError); + return channel_path; + + } //Only allow requests with handle type as contact QVariant vTargetHandleType = request.value("org.freedesktop.Telepathy.Channel.TargetHandleType"); @@ -451,8 +459,10 @@ QDBusObjectPath Connection::processChannel(const QVariantMap &request){ sendErrorReply("org.freedesktop.Telepathy.Error.InvalidArgument", strMessage); + return channel_path; } + /* 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.