Develop 20.08
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
#include "tsg_send_log.h"
|
||||
#include "tsg_send_log_internal.h"
|
||||
|
||||
char TSG_SEND_LOG_VERSION_20200724=0;
|
||||
char TSG_SEND_LOG_VERSION_20200729=0;
|
||||
struct tsg_log_instance_t *g_tsg_log_instance;
|
||||
|
||||
|
||||
@@ -113,6 +113,9 @@ int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE typ
|
||||
case TLD_TYPE_STRING:
|
||||
cJSON_AddStringToObject(_handle->object, key, (char *)value);
|
||||
break;
|
||||
case TLD_TYPE_CJSON:
|
||||
cJSON_AddItemToObject(_handle->object, key, (cJSON *)value);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
break;
|
||||
@@ -206,9 +209,9 @@ int set_common_field_from_label(struct tsg_log_instance_t *_instance, struct TLD
|
||||
if(internal_label->client_location!=NULL)
|
||||
{
|
||||
location=internal_label->client_location;
|
||||
snprintf(buff, sizeof(buff), "%s,%s,%s", (memcmp(location->city_full, "null", 4) ? "" : location->city_full),
|
||||
(memcmp(location->province_full, "null", 4) ? "" : location->province_full),
|
||||
(memcmp(location->country_full, "null", 4) ? "" : location->country_full)
|
||||
snprintf(buff, sizeof(buff), "%s,%s,%s", (!(memcmp(location->city_full, "null", 4)) ? "" : location->city_full),
|
||||
(!(memcmp(location->province_full, "null", 4)) ? "" : location->province_full),
|
||||
(!(memcmp(location->country_full, "null", 4)) ? "" : location->country_full)
|
||||
);
|
||||
TLD_append(_handle, _instance->id2field[LOG_COMMON_CLINET_LOCATION].name, (void *)buff, TLD_TYPE_STRING);
|
||||
}
|
||||
@@ -216,9 +219,9 @@ int set_common_field_from_label(struct tsg_log_instance_t *_instance, struct TLD
|
||||
if(internal_label->server_location!=NULL)
|
||||
{
|
||||
location=internal_label->server_location;
|
||||
snprintf(buff, sizeof(buff), "%s,%s,%s", (memcmp(location->city_full, "null", 4) ? "" : location->city_full),
|
||||
(memcmp(location->province_full, "null", 4) ? "" : location->province_full),
|
||||
(memcmp(location->country_full, "null", 4) ? "" : location->country_full)
|
||||
snprintf(buff, sizeof(buff), "%s,%s,%s", (!(memcmp(location->city_full, "null", 4)) ? "" : location->city_full),
|
||||
(!(memcmp(location->province_full, "null", 4)) ? "" : location->province_full),
|
||||
(!(memcmp(location->country_full, "null", 4)) ? "" : location->country_full)
|
||||
);
|
||||
TLD_append(_handle, _instance->id2field[LOG_COMMON_SERVER_LOCATION].name, (void *)buff, TLD_TYPE_STRING);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user