diff options
author | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-13 20:29:46 +0000 |
---|---|---|
committer | automerge <automerge@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-13 20:29:46 +0000 |
commit | 281582987022ff9fbede2fc1f9c06d214da23f3a (patch) | |
tree | 61367f57ddd25ef29771bfb8a40c84778aa6a243 | |
parent | 563d0c398c3ae668b629297cda6c9409b9150fb3 (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@75106 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_chanspy.c | 2 | ||||
-rw-r--r-- | channels/chan_zap.c | 15 | ||||
-rw-r--r-- | res/res_musiconhold.c | 2 |
3 files changed, 16 insertions, 3 deletions
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c index 7510c68e9..34db4f7be 100644 --- a/apps/app_chanspy.c +++ b/apps/app_chanspy.c @@ -432,6 +432,8 @@ static int chanspy_exec(struct ast_channel *chan, void *data) volfactor = vol; } } + else + ast_clear_flag(&flags, AST_FLAGS_ALL); if (recbase) { char filename[512]; diff --git a/channels/chan_zap.c b/channels/chan_zap.c index e66e171db..695684ce8 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -1726,14 +1726,23 @@ static int restore_gains(struct zt_pvt *p) static inline int zt_set_hook(int fd, int hs) { - int x, res; + int x, res, count = 0; + x = hs; res = ioctl(fd, ZT_HOOK, &x); - if (res < 0) - { + + while (res < 0 && count < 20) { + usleep(100000); /* 1/10 sec. */ + x = hs; + res = ioctl(fd, ZT_HOOK, &x); + count++; + } + + if (res < 0) { if (errno == EINPROGRESS) return 0; ast_log(LOG_WARNING, "zt hook failed: %s\n", strerror(errno)); } + return res; } diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index efdd90bc4..f4e3a8167 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -660,8 +660,10 @@ static struct mohdata *mohalloc(struct mohclass *cl) flags = fcntl(moh->pipe[1], F_GETFL); fcntl(moh->pipe[1], F_SETFL, flags | O_NONBLOCK); moh->parent = cl; + ast_mutex_lock(&moh_lock); moh->next = cl->members; cl->members = moh; + ast_mutex_unlock(&moh_lock); return moh; } |