TSG-7626: IP归属地日志字段仅存在一级

This commit is contained in:
liuxueli
2021-09-02 19:30:15 +08:00
committed by 刘学利
parent cc4ff41cc9
commit 3e911b2a4c

View File

@@ -216,9 +216,9 @@ static int set_asn(struct TLD_handle_t *_handle, struct streaminfo *a_stream, ch
if(asn_info!=NULL) if(asn_info!=NULL)
{ {
len+=string_cat(buff, buff_len-len, asn_info->asn_id); len+=string_cat(buff+len, buff_len-len, asn_info->asn_id);
buff[len++]='('; buff[len++]='(';
len+=string_cat(buff, buff_len-len, asn_info->organization); len+=string_cat(buff+len, buff_len-len, asn_info->organization);
buff[len++]=')'; buff[len++]=')';
TLD_append(_handle, field_name, (void *)buff, TLD_TYPE_STRING); TLD_append(_handle, field_name, (void *)buff, TLD_TYPE_STRING);
} }
@@ -234,11 +234,11 @@ static int set_location(struct TLD_handle_t *_handle, struct streaminfo *a_strea
if(location_info!=NULL) if(location_info!=NULL)
{ {
len+=string_cat(buff, buff_len-len, location_info->city_full); len+=string_cat(buff+len, buff_len-len, location_info->city_full);
buff[len++]=','; buff[len++]=',';
len+=string_cat(buff, buff_len-len, location_info->province_full); len+=string_cat(buff+len, buff_len-len, location_info->province_full);
buff[len++]=','; buff[len++]=',';
len+=string_cat(buff, buff_len-len, location_info->country_full); len+=string_cat(buff+len, buff_len-len, location_info->country_full);
buff[len++]=','; buff[len++]=',';
TLD_append(_handle, field_name, (void *)buff, TLD_TYPE_STRING); TLD_append(_handle, field_name, (void *)buff, TLD_TYPE_STRING);