[asterisk-addons-commits] mnicholson: branch mnicholson/chan-mobile-refactor r746 - /team/mnicholson/ch...
SVN commits to the Asterisk addons project
asterisk-addons-commits at lists.digium.com
Mon Jan 26 12:28:54 CST 2009
Author: mnicholson
Date: Mon Jan 26 12:28:53 2009
New Revision: 746
URL: http://svn.digium.com/svn-view/asterisk-addons?view=rev&rev=746
Log:
make rfcomm_read() properly strip \r\n leading and ending pairs from received
messages
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=746&r1=745&r2=746
==============================================================================
--- team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c (original)
+++ team/mnicholson/chan-mobile-refactor/channels/chan_mobile.c Mon Jan 26 12:28:53 2009
@@ -1081,11 +1081,12 @@
/* check for '\r\n' */
if (got_cr && c == '\n') {
+ if (have_msg)
+ break;
+
got_cr = 0;
- if (have_msg)
- break;
- else
- have_msg = 1;
+ have_msg = 1;
+ continue;
} else if (got_cr) {
if (c != '\r')
got_cr = 0;
More information about the asterisk-addons-commits
mailing list