fixed another bug of type 1

This commit is contained in:
wangyu-
2017-10-16 07:50:28 -05:00
parent c688189035
commit 8a31ba5255
4 changed files with 185 additions and 83 deletions

View File

@@ -44,7 +44,7 @@ int delay_manager_t::add(my_time_t delay,const dest_t &dest,char *data,int len)
{
delay_data_t delay_data;
delay_data.dest=dest;
delay_data.data=data;
//delay_data.data=data;
delay_data.len=len;
if(capacity!=0&&int(delay_mp.size()) >=capacity)
@@ -54,6 +54,9 @@ int delay_manager_t::add(my_time_t delay,const dest_t &dest,char *data,int len)
}
if(delay==0)
{
static char buf[buf_len];
delay_data.data=buf;
memcpy(buf,data,len);
int ret=delay_data.handle();
if (ret != 0) {
mylog(log_trace, "handle() return %d\n", ret);