added select() support to packet capturing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20570 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -45,7 +45,14 @@ link_monitor_data(void *cookie, net_buffer *packet)
|
|||||||
if (buffer == NULL)
|
if (buffer == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
return fifo_enqueue_buffer(&protocol->fifo, buffer);
|
status_t status = fifo_enqueue_buffer(&protocol->fifo, buffer);
|
||||||
|
if (status >= B_OK)
|
||||||
|
notify_socket(protocol->socket, B_SELECT_READ,
|
||||||
|
protocol->fifo.current_bytes);
|
||||||
|
else
|
||||||
|
gNetBufferModule.free(buffer);
|
||||||
|
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user