X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FIPStack%2Ftcp.c;h=71dd4e5503e5c312ceccd0d43b72c9630b1d4413;hb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;hp=c8a5584c2062f3b8475d90546b45a31e0eec6e0c;hpb=385aa5c4b5e509d298b3341dcd27ca26c3ce2358;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/IPStack/tcp.c b/KernelLand/Modules/IPStack/tcp.c index c8a5584c..71dd4e55 100644 --- a/KernelLand/Modules/IPStack/tcp.c +++ b/KernelLand/Modules/IPStack/tcp.c @@ -33,7 +33,7 @@ Uint16 TCP_GetUnusedPort(); int TCP_DeallocatePort(Uint16 Port); // --- Server tVFS_Node *TCP_Server_Init(tInterface *Interface); -char *TCP_Server_ReadDir(tVFS_Node *Node, int Pos); + int TCP_Server_ReadDir(tVFS_Node *Node, int Pos, char Name[FILENAME_MAX]); tVFS_Node *TCP_Server_FindDir(tVFS_Node *Node, const char *Name); int TCP_Server_IOCtl(tVFS_Node *Node, int ID, void *Data); void TCP_Server_Close(tVFS_Node *Node); @@ -878,11 +878,10 @@ tVFS_Node *TCP_Server_Init(tInterface *Interface) * \param Node Server node * \param Pos Position (ignored) */ -char *TCP_Server_ReadDir(tVFS_Node *Node, int Pos) +int TCP_Server_ReadDir(tVFS_Node *Node, int Pos, char Dest[FILENAME_MAX]) { tTCPListener *srv = Node->ImplPtr; tTCPConnection *conn; - char *ret; ENTER("pNode iPos", Node, Pos); @@ -911,11 +910,10 @@ char *TCP_Server_ReadDir(tVFS_Node *Node, int Pos) LOG("srv->NewConnections = %p", srv->NewConnections); LOG("srv->ConnectionsTail = %p", srv->ConnectionsTail); - ret = malloc(9); - itoa(ret, conn->Node.ImplInt, 16, 8, '0'); - Log_Log("TCP", "Thread %i got '%s'", Threads_GetTID(), ret); - LEAVE('s', ret); - return ret; + itoa(Dest, conn->Node.ImplInt, 16, 8, '0'); + Log_Log("TCP", "Thread %i got connection '%s'", Threads_GetTID(), Dest); + LEAVE('i', 0); + return 0; } /**