error handling
diff --git a/objects/sensor_occ_obj.c b/objects/sensor_occ_obj.c
index bd68382..91935f2 100644
--- a/objects/sensor_occ_obj.c
+++ b/objects/sensor_occ_obj.c
@@ -13,9 +13,12 @@
static gboolean poll_occ(gpointer user_data)
{
-/*
+ //g_dbus_object_get_object_path(G_DBUS_OBJECT(user_data)),
+ Occ* occ = object_get_occ((Object*)user_data);
+
gchar *s;
- s = g_strdup_printf ("%s/Temperature/%d",g_dbus_object_get_object_path(G_DBUS_OBJECT(user_data)), 1);
+ s = g_strdup_printf ("%s/Temperature/P8_%s_Core_%d",
+ dbus_object_path,occ_get_instance_name(occ),1);
g_print("%s\n",s);
GDBusInterface* interface = g_dbus_object_manager_get_interface((GDBusObjectManager*)manager,s,
@@ -31,12 +34,9 @@
}
g_free (s);
//g_free(interface);
-*/
return TRUE;
}
-
-
static gboolean
on_init (Occ *occ,
GDBusMethodInvocation *invocation,
@@ -84,6 +84,7 @@
Occ *occ = occ_skeleton_new ();
object_skeleton_set_occ (object, occ);
g_object_unref (occ);
+ occ_set_instance_name(occ,cmd->argv[i]);
SensorI2c *i2c = sensor_i2c_skeleton_new ();
object_skeleton_set_sensor_i2c (object, i2c);