[asterisk-addons-commits] mnicholson: branch mnicholson/chan-mobile-refactor r744 - /team/mnicholson/ch...
SVN commits to the Asterisk addons project
asterisk-addons-commits at lists.digium.com
Mon Jan 26 11:44:07 CST 2009
Author: mnicholson
Date: Mon Jan 26 11:44:06 2009
New Revision: 744
URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=744
Log:
Updated docs for rfcomm_wait() and tweaked behavior.
Modified:
team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c
Modified: team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c
URL: http://svn.digium.com/svn-view/asterisk-addons/team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c?view=diff&rev=744&r1=743&r2=744
==============================================================================
--- team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c (original)
+++ team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c Mon Jan 26 11:44:06 2009
@@ -1034,10 +1034,21 @@
}
+/*
+ * \brief Wait for activity on an rfcomm socket.
+ * \param rsock the socket to watch
+ * \param ms a pointer to an int containing a timeout in ms
+ * \return zero on timeout and the socket fd (non-zero) otherwise
+ * \retval 0 timeout
+ */
static int rfcomm_wait(int rsock, int *ms)
{
- int exception;
- return ast_waitfor_n_fd(&rsock, 1, ms, &exception);
+ int exception, outfd;
+ outfd = ast_waitfor_n_fd(&rsock, 1, ms, &exception);
+ if (outfd < 0)
+ outfd = 0;
+
+ return outfd;
}
/*
More information about the asterisk-addons-commits
mailing list