TSG-10804: 加强获取eml文件名判断逻辑,防止公用结构体指针被误使用导致异常
This commit is contained in:
@@ -1234,7 +1234,7 @@ static int set_user_region(struct tsg_log_instance_t *_instance, struct TLD_hand
|
|||||||
static int set_mail_eml(struct tsg_log_instance_t *_instance, struct TLD_handle_t *_handle, struct streaminfo *a_stream)
|
static int set_mail_eml(struct tsg_log_instance_t *_instance, struct TLD_handle_t *_handle, struct streaminfo *a_stream)
|
||||||
{
|
{
|
||||||
struct tsg_conn_sketch_notify_data *notify_mail=(struct tsg_conn_sketch_notify_data *)stream_bridge_async_data_get(a_stream, g_tsg_para.bridge_id[BRIDGE_TYPE_RECV_CONN_SKETCH_DATA]);
|
struct tsg_conn_sketch_notify_data *notify_mail=(struct tsg_conn_sketch_notify_data *)stream_bridge_async_data_get(a_stream, g_tsg_para.bridge_id[BRIDGE_TYPE_RECV_CONN_SKETCH_DATA]);
|
||||||
if(notify_mail!=NULL && notify_mail->pdata.mail_eml_filename!=NULL)
|
if(notify_mail!=NULL && notify_mail->pdata.mail_eml_filename!=NULL && notify_mail->protocol==PROTO_MAIL)
|
||||||
{
|
{
|
||||||
TLD_delete(_handle, _instance->id2field[LOG_COMMON_MAIL_EML_FILE].name);
|
TLD_delete(_handle, _instance->id2field[LOG_COMMON_MAIL_EML_FILE].name);
|
||||||
TLD_append(_handle, _instance->id2field[LOG_COMMON_MAIL_EML_FILE].name, (void *)notify_mail->pdata.mail_eml_filename, TLD_TYPE_STRING);
|
TLD_append(_handle, _instance->id2field[LOG_COMMON_MAIL_EML_FILE].name, (void *)notify_mail->pdata.mail_eml_filename, TLD_TYPE_STRING);
|
||||||
|
|||||||
Reference in New Issue
Block a user