diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-03 00:39:04 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-11-03 00:39:04 +0000 |
commit | d3d057390c26ce35b54750705377c4d3ff4e42bd (patch) | |
tree | a04b5ab1a5d778cb8c4239d8cac88ef1a5ebba5d /pbx/pbx_dundi.c | |
parent | 9a2130e9dec6e913af3b75006c23feb0520d6814 (diff) |
port gcc 4.3.x warning fixes from trunk to this branch
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r-- | pbx/pbx_dundi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 474012776..cf214dc31 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -3002,7 +3002,9 @@ static void destroy_trans(struct dundi_transaction *trans, int fromtimeout) if (AST_LIST_EMPTY(&trans->parent->trans)) { /* Wake up sleeper */ if (trans->parent->pfds[1] > -1) { - write(trans->parent->pfds[1], "killa!", 6); + if (write(trans->parent->pfds[1], "killa!", 6) < 0) { + ast_log(LOG_WARNING, "write() failed: %s\n", strerror(errno)); + } } } } @@ -3769,7 +3771,10 @@ static int dundi_precache_internal(const char *context, const char *number, int dr.expiration = dundi_cache_time; dr.hmd = &hmd; dr.pfds[0] = dr.pfds[1] = -1; - pipe(dr.pfds); + if (pipe(dr.pfds) < 0) { + ast_log(LOG_WARNING, "pipe() failed: %s\n", strerror(errno)); + return -1; + } build_transactions(&dr, ttl, 0, &foundcache, &skipped, 0, 1, 1, NULL, avoids, NULL); optimize_transactions(&dr, 0); foundanswers = 0; |