* Now disables debug output after startup (can be reenabled using the dprintf command)

* added a socket_notify() dummy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19377 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2006-11-28 02:12:03 +00:00
parent 1166a4f9b5
commit a9a07b7215
+37 -1
View File
@@ -493,6 +493,39 @@ socket_connected(net_socket *socket)
}
status_t
socket_notify(net_socket *socket, uint8 event, int32 value)
{
benaphore_lock(&socket->lock);
bool notify = true;
switch (event) {
case B_SELECT_READ:
{
if ((ssize_t)socket->receive.low_water_mark > value && value >= B_OK)
notify = false;
break;
}
case B_SELECT_WRITE:
{
if ((ssize_t)socket->send.low_water_mark > value && value >= B_OK)
notify = false;
break;
}
case B_SELECT_ERROR:
socket->error = value;
break;
}
if (notify)
;
benaphore_unlock(&socket->lock);
return B_OK;
}
net_socket_module_info gNetSocketModule = {
{
NET_SOCKET_MODULE_NAME,
@@ -523,7 +556,7 @@ net_socket_module_info gNetSocketModule = {
// notifications
NULL, //socket_request_notification,
NULL, //socket_cancel_notification,
NULL, //socket_notify,
socket_notify,
// standard socket API
NULL, //socket_accept,
@@ -1394,6 +1427,9 @@ main(int argc, char** argv)
setup_server();
gDebugOutputEnabled = false;
// debug output defaults to off after start
while (true) {
printf("> ");
fflush(stdout);