From: saerome.kim Date: Mon, 8 May 2017 11:28:21 +0000 (+0900) Subject: Added missing check-feature routine X-Git-Tag: submit/tizen/20170512.045637~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7dc6cc5ffc3e8c6a8062af7604359f3a5d4f329a;p=platform%2Fcore%2Fapi%2Fzigbee.git Added missing check-feature routine Change-Id: I46a266a69d920719959dfb647506eb7d25dfea4c Signed-off-by: saerome.kim --- diff --git a/lib/zbl_zcl.c b/lib/zbl_zcl.c index fda9303..bdbd0af 100644 --- a/lib/zbl_zcl.c +++ b/lib/zbl_zcl.c @@ -409,6 +409,7 @@ static unsigned char analog_discrete_thresholds[] = { API int zb_get_analog_or_discret(unsigned char type) { int index = 0; + CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE); unsigned char var = analog_discrete_thresholds[index]; while (var < type && var < 0xFF) { @@ -422,7 +423,10 @@ API int zb_get_analog_or_discret(unsigned char type) API int zb_get_data_size(unsigned char type) { int i; - int count = (int)(sizeof(attribute_sizes) / 2); + int count; + CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE); + + count = (int)(sizeof(attribute_sizes) / 2); for (i = 0; i < count; i++) { if (attribute_sizes[i].type == type) return attribute_sizes[i].size; @@ -1443,6 +1447,7 @@ API int zb_get_id_from_read_report_config_record(read_report_config_record_h han unsigned short *id) { struct read_reporting_configuration_record_s *h = handle; + CHECK_FEATURE_SUPPORTED(ZIGBEE_FEATURE); RETV_IF(NULL == h, ZIGBEE_ERROR_INVALID_PARAMETER); *id = h->id; return ZIGBEE_ERROR_NONE;