fix blocking of server

This commit is contained in:
Thomas Schoebel-Theuer 2011-11-03 17:23:34 +01:00 committed by Thomas Schoebel-Theuer
parent 3ef01a98db
commit c5a9ad16ff
2 changed files with 5 additions and 4 deletions

View File

@ -186,13 +186,13 @@ struct mars_socket *mars_accept_socket(struct mars_socket *msock, bool do_block)
if (unlikely(status < 0)) {
goto err;
}
if (unlikely(!new_socket || !new_socket->file)) {
if (unlikely(!new_socket)) {
status = -EBADF;
goto err;
}
#if 0
if (!do_block) { // switch back to blocking mode
#if 0 // do not use for now
if (!do_block && new_socket->file) { // switch back to blocking mode
new_socket->file->f_flags &= ~O_NONBLOCK;
}
#endif

View File

@ -569,7 +569,8 @@ static int _server_thread(void *data)
while (!kthread_should_stop() &&
(!mars_global || !mars_global->global_power.button)) {
msleep(1000);
MARS_DBG("system did not start up\n");
msleep(5000);
}
MARS_INF("-------- server now working on host '%s' ----------\n", id);