From 414f5376d587c9ef421afc916e5220c5e80fa902 Mon Sep 17 00:00:00 2001 From: "yeji01.kim" Date: Wed, 6 Dec 2017 12:03:26 +0900 Subject: [PATCH] Modify signal name D-bus does not allow "-" as the signal name. Change-Id: Ia3ab0b3ab696940f884385883d423153a8cfc8b8 Signed-off-by: yeji01.kim --- plugin/usb.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugin/usb.cpp b/plugin/usb.cpp index 30e9fbc..1cf423c 100644 --- a/plugin/usb.cpp +++ b/plugin/usb.cpp @@ -39,13 +39,13 @@ class DebuggingMode : public GlobalPolicy { public: DebuggingMode() : GlobalPolicy("usb-debugging") { - PolicyEventNotifier::create("usb-debugging"); + PolicyEventNotifier::create("usb_debugging"); } bool apply(const DataType& value) { int enable = value; - PolicyEventNotifier::emit("usb-debugging", enable ? "allowed" : "disallowed"); + PolicyEventNotifier::emit("usb_debugging", enable ? "allowed" : "disallowed"); return true; } }; @@ -54,13 +54,13 @@ class Tethering : public GlobalPolicy { public: Tethering() : GlobalPolicy("usb-tethering") { - PolicyEventNotifier::create("usb-tethering"); + PolicyEventNotifier::create("usb_tethering"); } bool apply(const DataType& value) { int enable = value; - PolicyEventNotifier::emit("usb-tethering", enable ? "allowed" : "disallowed"); + PolicyEventNotifier::emit("usb_tethering", enable ? "allowed" : "disallowed"); return true; } }; @@ -69,7 +69,7 @@ class Client : public GlobalPolicy { public: Client() : GlobalPolicy("usb-client") { - PolicyEventNotifier::create("usb-client"); + PolicyEventNotifier::create("usb_client"); sendDbusSignal(); } @@ -91,7 +91,7 @@ public: } if (ret == 0) { - PolicyEventNotifier::emit("usb-client", enable ? "allowed" : "disallowed"); + PolicyEventNotifier::emit("usb_client", enable ? "allowed" : "disallowed"); return true; } -- 2.34.1