[asterisk-commits] tilghman: branch tilghman/ast_select r281867 - in /team/tilghman/ast_select: ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Aug 11 14:40:24 CDT 2010
Author: tilghman
Date: Wed Aug 11 14:40:20 2010
New Revision: 281867
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=281867
Log:
Changes related to review process
Modified:
team/tilghman/ast_select/channels/chan_alsa.c
team/tilghman/ast_select/channels/chan_misdn.c
team/tilghman/ast_select/channels/chan_oss.c
team/tilghman/ast_select/channels/chan_phone.c
team/tilghman/ast_select/main/poll.c
team/tilghman/ast_select/res/res_features.c
Modified: team/tilghman/ast_select/channels/chan_alsa.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_alsa.c?view=diff&rev=281867&r1=281866&r2=281867
==============================================================================
--- team/tilghman/ast_select/channels/chan_alsa.c (original)
+++ team/tilghman/ast_select/channels/chan_alsa.c Wed Aug 11 14:40:20 2010
@@ -277,10 +277,14 @@
static void *sound_thread(void *unused)
{
- struct pollfd pfd[3] = { { sndcmd[0], POLLIN }, { writedev, 0 }, { readdev, 0 } };
- int res;
+ struct pollfd pfd[3] = { { .fd = sndcmd[0], .events = POLLIN }, { .fd = writedev }, { .fd = readdev } };
+ int res, x;
for (;;) {
+ for (x = 0; x < 3; x++) {
+ pfd[x].revents = 0;
+ }
+
pfd[1].events = cursound > -1 ? POLLOUT : 0;
#ifdef ALSA_MONITOR
pfd[2].events = !alsa.owner ? POLLIN : 0;
Modified: team/tilghman/ast_select/channels/chan_misdn.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_misdn.c?view=diff&rev=281867&r1=281866&r2=281867
==============================================================================
--- team/tilghman/ast_select/channels/chan_misdn.c (original)
+++ team/tilghman/ast_select/channels/chan_misdn.c Wed Aug 11 14:40:20 2010
@@ -2764,7 +2764,7 @@
{
struct chan_list *tmp;
int len, t;
- struct pollfd pfd = { -1, POLLIN };
+ struct pollfd pfd = { .fd = -1, .events = POLLIN };
if (!ast) {
chan_misdn_log(1, 0, "misdn_read called without ast\n");
@@ -4902,7 +4902,7 @@
if (ch->ast)
ast_queue_frame(ch->ast, &frame);
} else {
- struct pollfd pfd = { ch->pipe[1], POLLOUT };
+ struct pollfd pfd = { .fd = ch->pipe[1], .events = POLLOUT };
int t;
t = ast_poll(&pfd, 1, 0);
Modified: team/tilghman/ast_select/channels/chan_oss.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_oss.c?view=diff&rev=281867&r1=281866&r2=281867
==============================================================================
--- team/tilghman/ast_select/channels/chan_oss.c (original)
+++ team/tilghman/ast_select/channels/chan_oss.c Wed Aug 11 14:40:20 2010
@@ -605,7 +605,7 @@
}
for (;;) {
int res;
- struct pollfd pfd[2] = { { o->sndcmd[0], POLLIN }, { o->sounddev, 0 } };
+ struct pollfd pfd[2] = { { .fd = o->sndcmd[0], .events = POLLIN }, { .fd = o->sounddev, .events = 0 } };
pthread_testcancel();
Modified: team/tilghman/ast_select/channels/chan_phone.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/channels/chan_phone.c?view=diff&rev=281867&r1=281866&r2=281867
==============================================================================
--- team/tilghman/ast_select/channels/chan_phone.c (original)
+++ team/tilghman/ast_select/channels/chan_phone.c Wed Aug 11 14:40:20 2010
@@ -1033,6 +1033,7 @@
}
fds[inuse_fds].fd = i->fd;
fds[inuse_fds].events = POLLIN | POLLERR;
+ fds[inuse_fds].revents = 0;
inuse_fds++;
if (i->dialtone && i->mode != MODE_SIGMA) {
Modified: team/tilghman/ast_select/main/poll.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/main/poll.c?view=diff&rev=281867&r1=281866&r2=281867
==============================================================================
--- team/tilghman/ast_select/main/poll.c (original)
+++ team/tilghman/ast_select/main/poll.c Wed Aug 11 14:40:20 2010
@@ -93,6 +93,7 @@
Private Functions
\*---------------------------------------------------------------------------*/
+#if defined(AST_POLL_COMPAT) || !defined(HAVE_PPOLL)
static int map_poll_spec(struct pollfd *pArray, unsigned long n_fds,
ast_fdset *pReadSet, ast_fdset *pWriteSet, ast_fdset *pExceptSet)
{
@@ -216,6 +217,7 @@
return;
}
+#endif /* defined(AST_POLL_COMPAT) || !defined(HAVE_PPOLL) */
/*---------------------------------------------------------------------------*\
Public Functions
Modified: team/tilghman/ast_select/res/res_features.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/ast_select/res/res_features.c?view=diff&rev=281867&r1=281866&r2=281867
==============================================================================
--- team/tilghman/ast_select/res/res_features.c (original)
+++ team/tilghman/ast_select/res/res_features.c Wed Aug 11 14:40:20 2010
@@ -2314,10 +2314,15 @@
/* Get chan, exten from derived kludge */
if (pu->peername[0]) {
/* Don't use ast_strdupa() inside an infinite loop */
- char *peername = ast_strdup(pu->peername);
- char *cp = strrchr(peername, '-');
- if (cp) {
- *cp = 0;
+ char *dash, *peername = ast_strdup(pu->peername);
+ if (!peername) {
+ /* Skip for the time being. */
+ pl = pu;
+ pu = pu->next;
+ continue;
+ }
+ if ((dash = strrchr(peername, '-'))) {
+ *dash = '\0';
}
if (!(con = ast_context_find_or_create(NULL, parking_con_dial, registrar))) {
ast_log(LOG_ERROR, "Parking dial context '%s' does not exist and unable to create\n", parking_con_dial);
@@ -2477,6 +2482,7 @@
new_fds = tmp;
new_fds[new_nfds].fd = chan->fds[x];
new_fds[new_nfds].events = POLLIN | POLLERR;
+ new_fds[new_nfds].revents = 0;
new_nfds++;
}
}
More information about the asterisk-commits
mailing list