From 108cc8f03021f4b94a291c166e8a890c16893528 Mon Sep 17 00:00:00 2001 From: jsorg71 Date: Sun, 19 Apr 2009 17:13:56 +0000 Subject: [PATCH] fix some minor error issues --- common/os_calls.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/os_calls.c b/common/os_calls.c index d6beac71..5fdcdd51 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -910,6 +910,14 @@ g_obj_wait(tbus* read_objs, int rcount, tbus* write_objs, int wcount, i = select(max + 1, &rfds, &wfds, 0, ptime); if (i < 0) { + /* these are not really errors */ + if ((errno == EAGAIN) || + (errno == EWOULDBLOCK) || + (errno == EINPROGRESS) || + (errno == EINTR)) /* signal occured */ + { + return 0; + } return 1; } return 0; @@ -1381,6 +1389,10 @@ g_strncasecmp(const char* c1, const char* c2, int len) int APP_CC g_atoi(char* str) { + if (str == 0) + { + return 0; + } return atoi(str); }