From 68fe0ff1780191b345581c30be8d5b1465ae6d04 Mon Sep 17 00:00:00 2001 From: lishu Date: Wed, 11 Dec 2019 09:45:15 +0800 Subject: fix bug --- src/frag_monitor.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/frag_monitor.c b/src/frag_monitor.c index 1c9f28f..a0ab059 100644 --- a/src/frag_monitor.c +++ b/src/frag_monitor.c @@ -213,21 +213,21 @@ void frag_json_report(int local_log_type, frag_info_t* frag, http_infor* a_http, gen_key = append_http_query_key(a_tcp, a_http->http_session_seq, query_url_key, sizeof(query_url_key)); if(gen_key >= 0) { - opt[0].opt_len = strlen(query_url_key); - opt[0].opt_type = META_OPT_SINGLE_KEY; - opt[0].opt_value = query_url_key; + opt[opt_num].opt_len = strlen(query_url_key); + opt[opt_num].opt_type = META_OPT_SINGLE_KEY; + opt[opt_num].opt_value = query_url_key; opt_num ++; } /*referer*/ if(frag->frag_opt[FRAG_REFERER].opt_value!=NULL) { - opt[1].opt_len = frag->frag_opt[FRAG_REFERER].opt_len; - opt[1].opt_type = META_OPT_REFERER; - opt[1].opt_value = frag->frag_opt[FRAG_REFERER].opt_value; + opt[opt_num].opt_len = frag->frag_opt[FRAG_REFERER].opt_len; + opt[opt_num].opt_type = META_OPT_REFERER; + opt[opt_num].opt_value = frag->frag_opt[FRAG_REFERER].opt_value; opt_num ++; } - AV_local_log_convert_json(&p,local_log_type, opt,opt_num); + AV_local_log_convert_json(&p,local_log_type, opt,opt_num); } //void frgmnt_index_sendback_more(frag_info_t* frag, http_infor* a_http, struct streaminfo *a_tcp, int thread_seq) -- cgit v1.2.3