Skip to content

Commit

Permalink
Merge pull request #297 from wwbfred/branch_libev
Browse files Browse the repository at this point in the history
Fix a bug mentioned in #290
  • Loading branch information
wangyu- committed Feb 7, 2023
2 parents a0c9cce + c6437cc commit dab3803
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 9 additions & 0 deletions fec_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,16 @@ struct fec_parameter_t
return 0;
}

int clone_fec(fec_parameter_t & other)
{
assert(other.rs_cnt>=1);
rs_cnt=other.rs_cnt;
memcpy(rs_par,other.rs_par,sizeof(rs_parameter_t)*rs_cnt);

version++;

return 0;
}
};

extern fec_parameter_t g_fec_par;
Expand Down
5 changes: 1 addition & 4 deletions misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,7 @@ int handle_command(char *s)
mylog(log_warn,"failed to parse [%s]\n",tmp_str);
return -1;
}
int version=g_fec_par.version;
g_fec_par.clone(tmp_par);
g_fec_par.version=version;
g_fec_par.version++;
g_fec_par.clone_fec(tmp_par);
strcpy(rs_par_str,tmp_str);
//g_fec_data_num=a;
//g_fec_redundant_num=b;
Expand Down

0 comments on commit dab3803

Please sign in to comment.