|
|
@ -3180,7 +3180,7 @@ int create_client_socket()
|
|
|
|
// exit(1);
|
|
|
|
// exit(1);
|
|
|
|
//}
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
printf("[%s %d] Connect pass! %d\n",__FILE__,__LINE__,sockfd);
|
|
|
|
printh("[%s %d] Connect pass! %d\n",__FILE__,__LINE__,sockfd);
|
|
|
|
return sockfd;
|
|
|
|
return sockfd;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -3219,18 +3219,6 @@ void vtycmd_data_init()
|
|
|
|
vtycmd->socket = -1;
|
|
|
|
vtycmd->socket = -1;
|
|
|
|
memset(&vtycmd->buf_read, 0, sizeof(vtycmd_head_t));
|
|
|
|
memset(&vtycmd->buf_read, 0, sizeof(vtycmd_head_t));
|
|
|
|
memset(&vtycmd->buf_write, 0, sizeof(vtycmd_head_t));
|
|
|
|
memset(&vtycmd->buf_write, 0, sizeof(vtycmd_head_t));
|
|
|
|
|
|
|
|
|
|
|
|
if (pthread_mutex_init(&vtycmd->wr_mutex, NULL) != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
log_err(LOG_DEFAULT, "ERROR at mutex init return %s!", safe_strerror(errno));
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (pthread_mutex_init(&vtycmd->rd_mutex, NULL) != 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
log_err(LOG_DEFAULT, "ERROR at mutex init return %s!", safe_strerror(errno));
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void vtycmd_init()
|
|
|
|
void vtycmd_init()
|
|
|
|