server & client test
This commit is contained in:
parent
96d938286e
commit
73118044dc
1 changed files with 2 additions and 2 deletions
|
@ -147,14 +147,14 @@ int server_init(Server* srv, unsigned short Port, unsigned int dwMaxConnections)
|
|||
srv->_OnDisconnect=0;
|
||||
srv->_OnWrite=0;
|
||||
|
||||
// Allocate needed Memory
|
||||
// Allocate needed Memory
|
||||
srv->sConnections=(SOCKET*)kmalloc(sizeof(SOCKET)*srv->dwConnections);
|
||||
srv->ConnectionsAddr =(struct sockaddr_in*) kmalloc(sizeof(struct sockaddr_in)*dwMaxConnections);
|
||||
srv->bThreads = (tid_t*)kmalloc(sizeof(tid_t)*dwMaxConnections);
|
||||
|
||||
if (!srv->sConnections || !srv->ConnectionsAddr || !srv->bThreads)
|
||||
{
|
||||
kprintf("low on mem");
|
||||
kprintf("low on mem -%d- -%d- -%d-");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue