aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/pbx_dundi.c
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-02 18:52:13 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-11-02 18:52:13 +0000
commitcc1b2c100fc6dd44a690652ecd3c5788b0438ea7 (patch)
treea3750d996d41e35c5df34c29533dd7d9fdcaff24 /pbx/pbx_dundi.c
parent2d6e969e7c81afb0b050691b85f2bc74ca84ae62 (diff)
bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx/pbx_dundi.c')
-rw-r--r--pbx/pbx_dundi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 5d3a0be12..12ab1328d 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -2958,7 +2958,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));
+ }
}
}
}
@@ -3725,7 +3727,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;