GVariantIter *iter1 = NULL;
GVariantIter *iter2 = NULL;
- g_variant_get(parameters, "(ayyayq)", &iter1, &count, &iter2, &addr16);
- while (g_variant_iter_loop(iter1, "y", &value)) {
+ g_variant_get(parameters, "(a(y)ya(y)q)", &iter1, &count, &iter2, &addr16);
+ while (g_variant_iter_loop(iter1, "(y)", &value)) {
addr64[j] = value;
j++;
}
g_variant_iter_free(iter1);
j = 0;
- while (g_variant_iter_loop(iter2, "y", &value)) {
+ while (g_variant_iter_loop(iter2, "(y)", &value)) {
ep[j] = value;
j++;
}
/* Section 1. Subscribe ZDO signal */
id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
- "service_enabled", ZIGBEE_SERVICE_OBJECT_PATH, NULL,
+ "service_enabled", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
if (0 == id) {
ERR("g_dbus_connection_signal_subscribe(service_enabled) Fail(%d)", errno);
DBG("subscribed for service_enabled signal %d", id);
id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
- "child_joined", ZIGBEE_SERVICE_OBJECT_PATH, NULL,
+ "child_joined", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
if (0 == id) {
ERR("g_dbus_connection_signal_subscribe(child_rejoined) Fail(%d)\n", errno);
DBG("subscribed for child_joined signal %d", id);
id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
- "child_rejoined", ZIGBEE_SERVICE_OBJECT_PATH, NULL,
+ "child_rejoined", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
if (0 == id) {
ERR("g_dbus_connection_signal_subscribe(child_rejoined) Fail(%d)\n", errno);
DBG("subscribed for child_rejoined signal %d", id);
id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
- "child_left", ZIGBEE_SERVICE_OBJECT_PATH, NULL,
+ "child_left", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
if (0 == id) {
ERR("g_dbus_connection_signal_subscribe(child_left) Fail(%d)\n", errno);
DBG("subscribed for child_left signal %d", id);
id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
- "leave_network_done", ZIGBEE_SERVICE_OBJECT_PATH, NULL,
+ "leave_network_done", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
if (0 == id) {
ERR("g_dbus_connection_signal_subscribe(leave_network_done) Fail(%d)\n", errno);
DBG("subscribed for leave_network_done signal %d", id);
id = g_dbus_connection_signal_subscribe(gdbus_conn, NULL, ZIGBEE_SERVICE_INTERFACE,
- "form_network_done", ZIGBEE_SERVICE_OBJECT_PATH, NULL,
+ "form_network_done", ZIGBEE_CONTROL_OBJECT_PATH, NULL,
G_DBUS_CALL_FLAGS_NONE, _zbl_signal_handler, handle, NULL);
if (0 == id) {
ERR("g_dbus_connection_signal_subscribe(form_network_done) Fail(%d)\n", errno);
GError *dbus_err = NULL;
unsigned short cluster;
int i = 0;
+ int result = 0;
RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
RETV_IF(NULL == service_gproxy, ZIGBEE_ERROR_IO_ERROR);
-1, NULL, &dbus_err);
if (variant) {
- g_variant_get(variant, "(aq)", &iter);
+ g_variant_get(variant, "(iaq)", &result, &iter);
+ DBG("ret = [0x%x]", result);
+
while (g_variant_iter_loop(iter, "q", &cluster)) {
DBG("Cluster 0x%04X", cluster);
list[i++] = cluster;
GError *dbus_err = NULL;
unsigned char endpoint;
int i = 0;
+ int result = ZIGBEE_ERROR_NONE;
RETV_IF(NULL == gdbus_conn, ZIGBEE_ERROR_IO_ERROR);
RETV_IF(NULL == service_gproxy, ZIGBEE_ERROR_IO_ERROR);
g_variant_builder_unref(mac_builder);
variant = g_dbus_proxy_call_sync(service_gproxy, "get_endpoint_list",
- g_variant_new("(@ay)", mac_variant), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
+ g_variant_new("(@ay)", mac_variant),
+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
if (variant) {
- g_variant_get(variant, "(ay)", &iter);
+ g_variant_get(variant, "(iay)", &result, &iter);
+ DBG("ret = [0x%x]", result);
+
while (g_variant_iter_loop(iter, "y", &endpoint)) {
DBG("Endpoint 0x%X", endpoint);
list[i++] = endpoint;
g_variant_builder_unref(mac_builder);
variant = g_dbus_proxy_call_sync(service_gproxy, "get_node_type",
- g_variant_new("(@ay)", mac_variant), G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
+ g_variant_new("(@ay)", mac_variant),
+ G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
if (variant) {
g_variant_get(variant, "(y)", &n_type);
GVariantIter *mac_iter = NULL;
GVariantIter *endpoint_iter = NULL;
GError *dbus_err = NULL;
+ int result = 0;
unsigned short node_id;
unsigned char node_type;
unsigned char node_mac_address[8] = {0x00};
NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, &dbus_err);
if (variant) {
- g_variant_get(variant, "(a(qyayyay))", &iter);
+ g_variant_get(variant, "(ia(qyayyay))", &result, &iter);
+ DBG("ret = [0x%x]", result);
list = calloc(MAX_DEVICE_LIST+1, sizeof(zb_end_device_info_h));
RETV_IF(NULL == list, ZIGBEE_ERROR_OUT_OF_MEMORY);