修正协议ID的值

判断发送日志字段的长度是否为0
This commit is contained in:
liuxueli
2021-05-12 13:51:51 +08:00
parent ce7120dd6e
commit bc29a6ca00
2 changed files with 12 additions and 9 deletions

View File

@@ -632,6 +632,10 @@ int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE typ
case TLD_TYPE_FILE:
break;
case TLD_TYPE_STRING:
if(strlen((char *)value)==0)
{
break;
}
cJSON_AddStringToObject(_handle->object, key, (char *)value);
break;
case TLD_TYPE_CJSON:
@@ -641,7 +645,6 @@ int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE typ
return -1;
break;
}
return 0;
}