made UDP's send_data call into IPv4's, so we can handle of the datagram stuff in one place.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20694 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
629878443b
commit
4229d7091e
@ -1260,7 +1260,11 @@ ipv4_send_data(net_protocol *_protocol, net_buffer *buffer)
|
||||
status_t status = sDatalinkModule->get_buffer_route(sDomain, buffer,
|
||||
&route);
|
||||
if (status >= B_OK) {
|
||||
status = ipv4_send_routed_data(protocol, route, buffer);
|
||||
if (protocol)
|
||||
status = protocol->socket->first_protocol->module->send_routed_data(
|
||||
protocol->socket->first_protocol, route, buffer);
|
||||
else
|
||||
status = ipv4_send_routed_data(NULL, route, buffer);
|
||||
sDatalinkModule->put_route(sDomain, route);
|
||||
}
|
||||
|
||||
|
@ -894,15 +894,10 @@ UdpEndpoint::SendData(net_buffer *buffer)
|
||||
{
|
||||
TRACE_EP("SendData(%p [%lu bytes])", buffer, buffer->size);
|
||||
|
||||
net_route *route = NULL;
|
||||
status_t status = gDatalinkModule->get_buffer_route(Domain(),
|
||||
buffer, &route);
|
||||
if (status >= B_OK) {
|
||||
status = SendRoutedData(buffer, route);
|
||||
gDatalinkModule->put_route(Domain(), route);
|
||||
}
|
||||
|
||||
return status;
|
||||
// This will call into IPv4 which will do all of the obtaining
|
||||
// routes and other datagram related dirty work and eventually
|
||||
// call back into our send_routed_data.
|
||||
return next->module->send_data(next, buffer);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user