diff options
| author | 李佳 <[email protected]> | 2020-08-26 19:55:05 +0800 |
|---|---|---|
| committer | 李佳 <[email protected]> | 2020-08-26 19:55:05 +0800 |
| commit | b59c12a9c6ada74c6a3b26556cb71bf9e5485390 (patch) | |
| tree | f731815ea0841688521f1eff2daa622ed0940013 /src | |
| parent | bb2effdba527a7ae69753a6a174005a71ff349b9 (diff) | |
Fix v4.0.20 ci build modev4.0.20-releaserel-4.0
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/config_parse.cpp | 2 | ||||
| -rw-r--r-- | src/packet_io/packet_io_marsio.c | 6 | ||||
| -rw-r--r-- | src/packet_io/sendpacket.c | 34 |
3 files changed, 37 insertions, 5 deletions
diff --git a/src/config/config_parse.cpp b/src/config/config_parse.cpp index 5ef8b0a..35a2d8c 100644 --- a/src/config/config_parse.cpp +++ b/src/config/config_parse.cpp @@ -598,7 +598,7 @@ int sapp_parse_config(void) tomlc99_wrap_load_string_def(default_config_file, (char *)"packet_io.external.interface", (char *)"type", pconfig->packet_io.external.interface.type_str, NAME_MAX, "pcap"); tomlc99_wrap_load_string_def(default_config_file, (char *)"packet_io.external.interface", (char *)"name", pconfig->packet_io.external.interface.name, NAME_MAX, "lo"); tomlc99_wrap_load_int_def(default_config_file, (char *)"packet_io.polling", (char *)"enabled", &pconfig->packet_io.polling_enabled, 1); - tomlc99_wrap_load_int_def(default_config_file, (char *)"packet_io.polling", (char *)"polling_priority", &pconfig->packet_io.polling_priority, 10); + tomlc99_wrap_load_int_def(default_config_file, (char *)"packet_io.polling", (char *)"polling_priority", &pconfig->packet_io.polling_priority, 100); /******************************* STREAM ******************************/ tomlc99_wrap_load_string_def(default_config_file, (char *)"STREAM", (char *)"stream_id_base_time", pconfig->stream.stream_id_base_time_str, 32, ""); diff --git a/src/packet_io/packet_io_marsio.c b/src/packet_io/packet_io_marsio.c index 7df69c7..73750a3 100644 --- a/src/packet_io/packet_io_marsio.c +++ b/src/packet_io/packet_io_marsio.c @@ -686,7 +686,7 @@ static void *marsio4_worker(void *arg) }else{ flush_buf(tid); /* �ް�ʱҪ����polling�ӿ� */ - if(stream_process_polling(tid) > 0){ + if((stream_process_polling(tid) & POLLING_STATE_WORK) != 0){ polling_work_times++; } } @@ -695,7 +695,7 @@ static void *marsio4_worker(void *arg) if((rcv_pkt_tims % sapp_global_val->config.packet_io.polling_priority) == 0){ /* ���������, һֱ�а�ʱ, ÿ��polling_priority����ҲҪ����polling�ӿ� */ - if(stream_process_polling(tid) > 0){ + if((stream_process_polling(tid) & POLLING_STATE_WORK) != 0){ polling_work_times++; } total_call_times++; @@ -707,8 +707,6 @@ static void *marsio4_worker(void *arg) rcv_pkt_tims = 0; polling_work_times = 0; } - - } return NULL; diff --git a/src/packet_io/sendpacket.c b/src/packet_io/sendpacket.c index 9df73e5..aedfb6c 100644 --- a/src/packet_io/sendpacket.c +++ b/src/packet_io/sendpacket.c @@ -3278,6 +3278,40 @@ int MESA_dir_human_to_link(int human_dir) return link_route_dir; } +/* + args: + ��·���䷽��: 0��1, ͨ������stream->routedir; + + ����ֵ: + 'E' or 'e': ��ʾ���������Ǵ�Internal to External. + 'I' or 'i': ��ʾ���������Ǵ�External to Internal. + 'x': ��������; +*/ +int MESA_dir_link_to_human(int link_route_dir) +{ + int human_dir; + + if((link_route_dir != 0) && (link_route_dir != 1)){ + return 'x'; + } + + if(0 == sapp_global_val->config.packet_io.inbound_route_dir){ + if(0 == link_route_dir){ + human_dir = 'I'; + }else{ + human_dir = 'E'; + } + }else{ + if(0 == link_route_dir){ + human_dir = 'E'; + }else{ + human_dir = 'I'; + } + } + + return human_dir; +} + static inline int dir_check(unsigned char raw_dir) |
