if (char_val != NULL){
if (char_val->attr_len > char_val->attr_max_len){
- LOG_ERROR("Error in %s, line=%d,attribute actual length should not be larger than max length\n",\
- __func__, __LINE__);
+ LOG_ERROR("Error in %s, line=%d,attribute actual length (%d) should not be larger than max length (%d)\n",\
+ __func__, __LINE__, char_val->attr_len, char_val->attr_max_len);
return ESP_ERR_INVALID_ARG;
}
}
if (char_descr_val != NULL){
if (char_descr_val->attr_len > char_descr_val->attr_max_len){
- LOG_ERROR("Error in %s, line=%d,attribute actual length should not be larger than max length\n",\
- __func__, __LINE__);
+ LOG_ERROR("Error in %s, line=%d,attribute actual length (%d) should not be larger than max length (%d)\n",\
+ __func__, __LINE__, char_descr_val->attr_len, char_descr_val->attr_max_len);
return ESP_ERR_INVALID_ARG;
}
}
if (p_char_val->p_value->attr_val.attr_val == NULL) {
deallocate_attr_in_db(p_db, p_char_decl);
deallocate_attr_in_db(p_db, p_char_val);
- GATT_TRACE_ERROR("Warning in %s, line=%d, insufficient resource to allocate for attribute value\n", __func__, __LINE__);
+ GATT_TRACE_WARNING("Warning in %s, line=%d, insufficient resource to allocate for attribute value\n", __func__, __LINE__);
return 0;
}
memset(p_char_val->p_value->attr_val.attr_val, 0, attr_val->attr_max_len);
if (attr_val->attr_val != NULL) {
if (attr_val->attr_max_len < attr_val->attr_len){
- GATT_TRACE_ERROR("Error in %s, Line=%d, attribute actual length(%d) should not larger than max size(%d)\n",
+ GATT_TRACE_ERROR("Error in %s, Line=%d, attribute actual length (%d) should not larger than max size (%d)\n",
__func__, __LINE__, attr_val->attr_len, attr_val->attr_max_len);
}
UINT16 actual_len = (attr_val->attr_max_len < attr_val->attr_len) ? (attr_val->attr_max_len) : (attr_val->attr_len);
if (attr_val != NULL){
if (attr_val->attr_len > attr_val->attr_max_len){
- GATT_TRACE_ERROR("Error in %s, line=%d,attribute actual length should not be larger than max length\n",\
- __func__, __LINE__);
+ GATT_TRACE_ERROR("Error in %s, line=%d,attribute actual length (%d) should not be larger than max length (%d)\n",\
+ __func__, __LINE__, attr_val->attr_len, attr_val->attr_max_len);
return 0;
}
}
p_char_dscptr->p_value->attr_val.attr_val = GKI_getbuf(attr_val->attr_max_len);
if (p_char_dscptr->p_value->attr_val.attr_val == NULL) {
deallocate_attr_in_db(p_db, p_char_dscptr);
- GATT_TRACE_ERROR("Warning in %s, line=%d, insufficient resource to allocate for descriptor value\n", __func__, __LINE__);
+ GATT_TRACE_WARNING("Warning in %s, line=%d, insufficient resource to allocate for descriptor value\n", __func__, __LINE__);
return 0;
}
is_prepare_write_valid = TRUE;
}
else if(prepare_record->total_num < queue_num) {
- GATT_TRACE_ERROR("Error in %s, line=%d, prepare write total number(=%d) \
- should not smaller than prepare queue number(=%d)\n", \
+ GATT_TRACE_ERROR("Error in %s, line=%d, prepare write total number (%d) \
+ should not smaller than prepare queue number (%d)\n", \
__func__, __LINE__,prepare_record->total_num, queue_num);
}
else if (prepare_record->error_code_app != GATT_SUCCESS){
status = GATT_BUSY; /* max pending command, application error */
}
}
- //test isl
- GATT_TRACE_ERROR("!!!write opcode=0x%x, need_rsp=0x%x, status=0x%x\n",op_code, sr_data.write_req.need_rsp, status);
/* response should be sent only for write_request */
if ((op_code == GATT_REQ_WRITE) && (sr_data.write_req.need_rsp == FALSE)){