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:
@@ -1260,7 +1260,11 @@ ipv4_send_data(net_protocol *_protocol, net_buffer *buffer)
|
|||||||
status_t status = sDatalinkModule->get_buffer_route(sDomain, buffer,
|
status_t status = sDatalinkModule->get_buffer_route(sDomain, buffer,
|
||||||
&route);
|
&route);
|
||||||
if (status >= B_OK) {
|
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);
|
sDatalinkModule->put_route(sDomain, route);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -894,15 +894,10 @@ UdpEndpoint::SendData(net_buffer *buffer)
|
|||||||
{
|
{
|
||||||
TRACE_EP("SendData(%p [%lu bytes])", buffer, buffer->size);
|
TRACE_EP("SendData(%p [%lu bytes])", buffer, buffer->size);
|
||||||
|
|
||||||
net_route *route = NULL;
|
// This will call into IPv4 which will do all of the obtaining
|
||||||
status_t status = gDatalinkModule->get_buffer_route(Domain(),
|
// routes and other datagram related dirty work and eventually
|
||||||
buffer, &route);
|
// call back into our send_routed_data.
|
||||||
if (status >= B_OK) {
|
return next->module->send_data(next, buffer);
|
||||||
status = SendRoutedData(buffer, route);
|
|
||||||
gDatalinkModule->put_route(Domain(), route);
|
|
||||||
}
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user