{
ZblibDriverType_e driver_type;
- driver_type = ((request_type && 0xFF000000) >> 24);
+ driver_type = ((request_type & 0xFF000000) >> 24);
return driver_type;
}
{
guint ops_id;
- ops_id = (request_type && 0x000000FF);
+ ops_id = (request_type & 0x000000FF);
return ops_id;
}
break;
case ZBLIB_ZCL_ALARM_OPS_GET_ALARM: {
- alarm_request_data = NULL;
+ ZigbeeZclAlarmGetAlarm_t *in_req;
+ ZigbeeZclAlarmGetAlarm_t *req = NULL;
+
+ in_req = (ZigbeeZclAlarmGetAlarm_t *)request_data;
+ if (in_req) {
+ /* Allocate memory */
+ req = (ZigbeeZclAlarmGetAlarm_t *)
+ g_malloc0(sizeof(ZigbeeZclAlarmGetAlarm_t));
+
+ /* Copy data */
+ req->node_id = in_req->node_id;
+ req->endpoint = in_req->endpoint;
+ }
+
+ alarm_request_data = (gpointer)req;
}
break;
req->node_id = in_req->node_id;
req->endpoint = in_req->endpoint;
req->step_mode = in_req->step_mode;
- req->move_mode = in_req->move_mode;
+ req->step_size = in_req->step_size;
req->transition_time = in_req->transition_time;
}
req->node_id = in_req->node_id;
req->endpoint = in_req->endpoint;
req->step_mode = in_req->step_mode;
- req->move_mode = in_req->move_mode;
+ req->step_size = in_req->step_size;
req->transition_time = in_req->transition_time;
}
break;
default:
+ Z_LOGE("Unexpected operation [%x]", ops_id);
break;
}
/* Copy data */
req->node_id = in_req->node_id;
req->dest_ep = in_req->dest_ep;
- req->rate_x = in_req->rate_x;
- req->rate_y = in_req->rate_y;
+ req->step_x = in_req->step_x;
+ req->step_y = in_req->step_y;
req->transition_time = in_req->transition_time;
}
g_strlcpy(req->scene_name,
in_req->scene_name, ZIGBEE_ZCL_SCENE_NAME_MAX_LEN + 1);
req->ext_field_set_len = in_req->ext_field_set_len;
- req->ext_field_set = (gshort *)g_memdup(in_req->ext_field_set,
+ req->ext_field_set = (char *)g_memdup(in_req->ext_field_set,
in_req->ext_field_set_len);
}
ZigBeeService *service = NULL;
ZigBeeRequest *request = NULL;
- zblib_check_null_ret_error("request", request, FALSE);
+ zblib_check_null_ret_error("service_interface", service_interface, FALSE);
/* Fetch service */
service = zblib_service_interface_ref_service(service_interface);
ZigBeeService *service = NULL;
ZigBeeRequest *request = NULL;
- zblib_check_null_ret_error("request", request, NULL);
+ zblib_check_null_ret_error("service_interface", service_interface, NULL);
/* Fetch service */
service = zblib_service_interface_ref_service(service_interface);