[haiku-commits] r35072 - haiku/trunk/src/add-ons/kernel/network/protocols/ipv4

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 14 Jan 2010 17:31:25 +0100 (CET)

Author: axeld
Date: 2010-01-14 17:31:24 +0100 (Thu, 14 Jan 2010)
New Revision: 35072
Changeset: http://dev.haiku-os.org/changeset/35072/haiku

Modified:
   haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp
Log:
* Fixed build with tracing turned on.


Modified: haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp
===================================================================
--- haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp      
2010-01-14 15:25:54 UTC (rev 35071)
+++ haiku/trunk/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp      
2010-01-14 16:31:24 UTC (rev 35072)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
+ * Copyright 2006-2010, Haiku, Inc. All Rights Reserved.
  * Distributed under the terms of the MIT License.
  *
  * Authors:
@@ -47,6 +47,7 @@
 #      define TRACE_SK(args...)        do { } while (0)
 #endif
 
+
 struct ipv4_header {
 #if B_HOST_IS_LENDIAN == 1
        uint8           header_length : 4;      // header length in 32-bit words
@@ -408,7 +409,7 @@
        }
 
        if (buffer != to)
-               panic("ipv4 packet reassembly did not work correctly.\n");
+               panic("ipv4 packet reassembly did not work correctly.");
 
        return B_OK;
 }
@@ -628,9 +629,8 @@
        // this way)
        mtu -= headerLength;
        mtu &= ~7;
-       TRACE("  adjusted MTU to %ld\n", mtu);
+       TRACE("  adjusted MTU to %ld, bytesLeft %ld", mtu, bytesLeft);
 
-       TRACE("  bytesLeft = %ld\n", bytesLeft);
        while (bytesLeft > 0) {
                uint32 fragmentLength = min_c(bytesLeft, mtu);
                bytesLeft -= fragmentLength;
@@ -644,7 +644,8 @@
                        headerLength);
                        // TODO: compute the checksum only for those parts that 
changed?
 
-               TRACE("  send fragment of %ld bytes (%ld bytes left)\n", 
fragmentLength, bytesLeft);
+               TRACE("  send fragment of %ld bytes (%ld bytes left)", 
fragmentLength,
+                       bytesLeft);
 
                net_buffer* fragmentBuffer;
                if (!lastFragment) {
@@ -1422,7 +1423,7 @@
                gBufferModule->checksum(buffer, 0, sizeof(ipv4_header), true),
                gBufferModule->checksum(buffer, 0, buffer->size, true));
 
-       TRACE_SK(protocol, "  SendRoutedData(): destination: %08lx",
+       TRACE_SK(protocol, "  SendRoutedData(): destination: %08x",
                ntohl(destination.sin_addr.s_addr));
 
        uint32 mtu = route->mtu ? route->mtu : interface->mtu;
@@ -1580,7 +1581,7 @@
                                &buffer->interface, &matchedAddressType)
                        && !sDatalinkModule->is_local_link_address(sDomain, 
true,
                                buffer->destination, &buffer->interface)) {
-                       TRACE("  ReceiveData(): packet was not for us %lx -> 
%lx",
+                       TRACE("  ReceiveData(): packet was not for us %x -> %x",
                                ntohl(header.source), 
ntohl(header.destination));
                        return B_ERROR;
                }


Other related posts:

  • » [haiku-commits] r35072 - haiku/trunk/src/add-ons/kernel/network/protocols/ipv4 - axeld