From cbeac9882f4b0a7c544b45243df7b8cd43a6a821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 2 Jun 2008 11:10:35 +0000 Subject: [PATCH] Patch by Vasilis Kaoutsis: * FragmentPacket::Reassemble() would return NULL instead of an error when the packet was not yet complete. * This didn't have any actual consequences, though, as Reassemble() was only called for a complete fragment set. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25758 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp b/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp index bd5d419562..8db74fe19f 100644 --- a/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp +++ b/src/add-ons/kernel/network/protocols/ipv4/ipv4.cpp @@ -368,15 +368,14 @@ FragmentPacket::AddFragment(uint16 start, uint16 end, net_buffer *buffer, } -/*! - Reassembles the fragments to the specified buffer \a to. +/*! Reassembles the fragments to the specified buffer \a to. This buffer must have been added via AddFragment() before. */ status_t FragmentPacket::Reassemble(net_buffer *to) { if (!IsComplete()) - return NULL; + return B_ERROR; net_buffer *buffer = NULL;