X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=zigbee-daemon%2Fzigbee-lib%2Fsrc%2Fzblib_request.c;h=9dd8e7d019707b698ca1ef9d0b51fade2acf7c98;hb=1057198628a7cda6a55e89f2c0f516eb725518e8;hp=21b78a3a119afdc69519fcf51e6319dec84514d7;hpb=8af81cf683923ef1da22ff07ab9116d141218175;p=platform%2Fcore%2Fconnectivity%2Fzigbee-manager.git diff --git a/zigbee-daemon/zigbee-lib/src/zblib_request.c b/zigbee-daemon/zigbee-lib/src/zblib_request.c index 21b78a3..9dd8e7d 100644 --- a/zigbee-daemon/zigbee-lib/src/zblib_request.c +++ b/zigbee-daemon/zigbee-lib/src/zblib_request.c @@ -1489,7 +1489,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlReadAttributesRequest_t)); /* Copy data */ - req->attribute_id = g_strdup(in_req->attribute_id); + req->attribute_id = g_memdup(in_req->attribute_id, in_req->attribute_id_len); req->attribute_id_len = in_req->attribute_id_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1512,7 +1512,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesRequest_t)); /* Copy data */ - req->write_records = g_strdup(in_req->write_records); + req->write_records = g_memdup(in_req->write_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1536,7 +1536,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesUndividedRequest_t)); /* Copy data */ - req->write_records = g_strdup(in_req->write_records); + req->write_records = g_memdup(in_req->write_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1560,7 +1560,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesNoResponse_t)); /* Copy data */ - req->write_records = g_strdup(in_req->write_records); + req->write_records = g_memdup(in_req->write_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1584,7 +1584,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlWriteAttributesStructed_t)); /* Copy data */ - req->write_records = g_strdup(in_req->write_records); + req->write_records = g_memdup(in_req->write_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1608,7 +1608,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlReadAttributesStructed_t)); /* Copy data */ - req->read_records = g_strdup(in_req->read_records); + req->read_records = g_memdup(in_req->read_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1632,7 +1632,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlConfigureReportingReq_t)); /* Copy data */ - req->read_records = g_strdup(in_req->read_records); + req->read_records = g_memdup(in_req->read_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1656,7 +1656,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req g_malloc0(sizeof(ZigbeeZclGlobalControlReadConfigureReporting_t)); /* Copy data */ - req->read_records = g_strdup(in_req->read_records); + req->read_records = g_memdup(in_req->read_records, in_req->records_len); req->records_len = in_req->records_len; req->node_id = in_req->node_id; req->cluster_id = in_req->cluster_id; @@ -1685,7 +1685,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req req->zcl_frame_ctrl = in_req->zcl_frame_ctrl; req->cluster_id = in_req->cluster_id; req->start_attribute = in_req->start_attribute; - req->max = in_req->max; + req->max_attribute_count = in_req->max_attribute_count; } zclglobal_control_request_data = (gpointer)req; @@ -1708,7 +1708,7 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req req->zcl_frame_ctrl = in_req->zcl_frame_ctrl; req->cluster_id = in_req->cluster_id; req->start_attribute = in_req->start_attribute; - req->max = in_req->max; + req->max_attribute_count = in_req->max_attribute_count; } zclglobal_control_request_data = (gpointer)req; @@ -1730,8 +1730,8 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req req->dest_ep = in_req->dest_ep; req->zcl_frame_ctrl = in_req->zcl_frame_ctrl; req->cluster_id = in_req->cluster_id; - req->start_attribute = in_req->start_attribute; - req->max = in_req->max; + req->start_command = in_req->start_command; + req->max_command_count = in_req->max_command_count; } zclglobal_control_request_data = (gpointer)req; @@ -1753,8 +1753,8 @@ static gpointer __zblib_request_create_zcl_global_control_request_data(guint req req->dest_ep = in_req->dest_ep; req->zcl_frame_ctrl = in_req->zcl_frame_ctrl; req->cluster_id = in_req->cluster_id; - req->start_attribute = in_req->start_attribute; - req->max = in_req->max; + req->start_command = in_req->start_command; + req->max_command_count = in_req->max_command_count; } zclglobal_control_request_data = (gpointer)req;