diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-11-18 20:13:09 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-11-18 20:13:09 +0000 |
commit | 2a97c2f0298379e903aac404b1f4cfd69c8cdcd2 (patch) | |
tree | 755f8ebffb76922a2a2ee0b121b5c1e57c70b696 | |
parent | 9ce11bb84c54444560d2fc548c9caf4e9ad96aa4 (diff) |
Check if the accept() call fails
-rw-r--r-- | sdpd/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sdpd/main.c b/sdpd/main.c index 0dde76fb..e64d805b 100644 --- a/sdpd/main.c +++ b/sdpd/main.c @@ -400,6 +400,11 @@ static gboolean io_accept_event(GIOChannel *chan, GIOCondition cond, gpointer da } else return FALSE; + if (nsk < 0) { + error("Can't accept connection: %s", strerror(errno)); + return TRUE; + } + io = g_io_channel_unix_new(nsk); g_io_channel_set_close_on_unref(io, TRUE); |