改用自行实现的http读取与解析,同时修复部分bug
This commit is contained in:
@ -33,9 +33,9 @@ int create_swap(const char *name)
|
||||
fcntl(fd, F_SETFD, flags);
|
||||
//调整大小
|
||||
rbt_msg *init_msg = (rbt_msg*)mmap(NULL, sizeof(rbt_msg), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
char buf[MAX_MESSAGE_BUF] = {'\0'};
|
||||
char buf[NET_MAX_MESSAGE_BUF] = {'\0'};
|
||||
//初始化
|
||||
memcpy(init_msg->raw_message,buf,MAX_MESSAGE_BUF);
|
||||
memcpy(init_msg->raw_message,buf,NET_MAX_MESSAGE_BUF);
|
||||
memcpy(init_msg->nickname,buf,64);
|
||||
sem_init(&init_msg->status,1,1);
|
||||
init_msg->raw_message[0] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user