From 804ee69a783f5c96157b586ed2d74e28e937ef82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 11 Aug 2006 17:34:57 +0000 Subject: [PATCH] * Fixed crashing bug on startup. Andrew, TCP is actually used in the build, so please test if it crashes before committing. * Fixed some minor style issues. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18486 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/network/protocols/tcp/tcp.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/add-ons/kernel/network/protocols/tcp/tcp.cpp b/src/add-ons/kernel/network/protocols/tcp/tcp.cpp index bcf1f81170..ddb08f8bbc 100644 --- a/src/add-ons/kernel/network/protocols/tcp/tcp.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/tcp.cpp @@ -42,7 +42,7 @@ static net_domain *sDomain; static net_address_module_info *sAddressModule; -//static net_buffer_module_info *sBufferModule; +net_buffer_module_info *sBufferModule; static net_datalink_module_info *sDatalinkModule; static net_stack_module_info *sStackModule; static hash_table *sTCPHash; @@ -223,22 +223,23 @@ tcp_error_reply(net_protocol *protocol, net_buffer *causedError, uint32 code, // #pragma mark - + static status_t tcp_init() { status_t status; +#if 0 sDomain = sStackModule->get_domain(AF_INET); sAddressModule = sDomain->address_module; +#endif status = get_module(NET_STACK_MODULE_NAME, (module_info **)&sStackModule); if (status < B_OK) return status; - -/* status = get_module(NET_BUFFER_MODULE_NAME, (module_info **)&sBufferModule); + status = get_module(NET_BUFFER_MODULE_NAME, (module_info **)&sBufferModule); if (status < B_OK) - goto err1;*/ - + goto err1; status = get_module(NET_DATALINK_MODULE_NAME, (module_info **)&sDatalinkModule); if (status < B_OK) goto err2; @@ -280,15 +281,15 @@ err4: err3: put_module(NET_DATALINK_MODULE_NAME); err2: -/* put_module(NET_BUFFER_MODULE_NAME); -err1:*/ + put_module(NET_BUFFER_MODULE_NAME); +err1: put_module(NET_STACK_MODULE_NAME); TRACE(("init_tcp() fails with %lx (%s)\n", status, strerror(status))); return status; - } + static status_t tcp_uninit() { @@ -301,6 +302,7 @@ tcp_uninit() return B_OK; } + static status_t tcp_std_ops(int32 op, ...) {