From cf24f76bf8f7367d36b528dc76cf6a63771beb8a Mon Sep 17 00:00:00 2001 From: wangyu- Date: Tue, 31 Oct 2017 22:29:16 -0500 Subject: [PATCH] revert last comit --- fec_manager.cpp | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/fec_manager.cpp b/fec_manager.cpp index c37b85c..46747f6 100644 --- a/fec_manager.cpp +++ b/fec_manager.cpp @@ -220,22 +220,11 @@ int fec_encode_manager_t::input(char *s,int len/*,int &is_first_packet*/) if(fec_mode==0&& s!=0 &&counter==0) { - if(fec_data_num==1) + int out_len=blob_encode.get_shard_len(fec_data_num,len); + if(out_len>fec_mtu) { - if(len>fec_mtu) - { - mylog(log_warn,"message too long for fec_data_num=1, len=%d fec_mtu=%d,ignored\n",len,fec_mtu); - return -1; - } - } - else - { - int out_len=blob_encode.get_shard_len(fec_data_num,len); - if(out_len>fec_mtu) - { - mylog(log_warn,"message too long ori_len=%d out_len=%d fec_mtu=%d,ignored\n",len,out_len,fec_mtu); - return -1; - } + mylog(log_warn,"message too long ori_len=%d out_len=%d fec_mtu=%d,ignored\n",len,out_len,fec_mtu); + return -1; } } if(fec_mode==1&&s!=0&&len>fec_mtu)