added dbus method debug info to manager interface
authorKevron Rees <kevron.m.rees@intel.com>
Wed, 11 Dec 2013 00:45:47 +0000 (16:45 -0800)
committerKevron Rees <kevron.m.rees@intel.com>
Wed, 11 Dec 2013 00:45:59 +0000 (16:45 -0800)
examples/dbusconfig
lib/vehicleproperty.cpp
plugins/dbus/abstractdbusinterface.cpp
plugins/dbus/abstractdbusinterface.h
plugins/dbus/automotivemanager.cpp

index 502f21a..761cf9f 100644 (file)
@@ -3,7 +3,7 @@
                {
                        "name" : "ExampleSouce",
                        "path" : "/usr/lib/automotive-message-broker/examplesourceplugin.so",
-                       "delay" : "24"
+                       "delay" : "1000"
                }
        ],
        "sinks": [
index 8b7f362..ec75ae7 100644 (file)
@@ -342,7 +342,7 @@ bool VehicleProperty::registerPropertyPriv(VehicleProperty::Property name, Vehic
 {
        if(ListPlusPlus<Property>(&mCapabilities).contains(name))
        {
-               DebugOut(0)<<__FUNCTION__<<" ERROR: property '"<<name<<"'' already registered."<<endl;
+               DebugOut(0)<<__FUNCTION__<<" ERROR: property '"<<name<<"' already registered."<<endl;
                return false;
        }
 
index 4c0f7a0..aedbaa3 100644 (file)
@@ -54,10 +54,6 @@ const uint getPid(const char *owner)
                throw std::runtime_error(error->message);
        }
 
-       const char* p = g_variant_get_type_string(pid);
-
-       DebugOut()<<"pid "<<p<<endl;
-
        uint thePid=0;
 
        g_variant_get(pid,"(u)",&thePid);
index 76e143d..ffbfb70 100644 (file)
@@ -31,6 +31,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 class AbstractProperty;
 
+const uint getPid(const char *owner);
+
 class AbstractDBusInterface
 {
 
index 304a54f..58526df 100644 (file)
@@ -41,6 +41,12 @@ static void handleMethodCall(GDBusConnection       *connection,
 
        std::string method = method_name;
 
+       if(DebugOut::getDebugThreshhold() >= 6)
+       {
+               DebugOut(6)<<"DBus method call from: "<<sender<< " pid: " <<getPid(sender)<< " interface: "<<interface_name<<" method: "<<method<<endl;
+               DebugOut(6)<<"DBus method call path: "<<object_path<<endl;
+       }
+
        if(method == "findProperty")
        {
                DebugOut(DebugOut::Warning)<<"org.automotive.Manager.findProperty() is deprecated.  Use org.automotive.Manager.FindObject() instead."<<endl;