[asterisk-commits] twilson: branch 1.6.0 r159024 - in /branches/1.6.0: ./ channels/chan_usbradio.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Nov 24 22:05:32 CST 2008
Author: twilson
Date: Mon Nov 24 22:05:31 2008
New Revision: 159024
URL: http://svn.digium.com/view/asterisk?view=rev&rev=159024
Log:
Merged revisions 158992 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r158992 | twilson | 2008-11-24 21:49:30 -0600 (Mon, 24 Nov 2008) | 2 lines
Make chan_usbradio compile under dev mode
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_usbradio.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.
Modified: branches/1.6.0/channels/chan_usbradio.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_usbradio.c?view=diff&rev=159024&r1=159023&r2=159024
==============================================================================
--- branches/1.6.0/channels/chan_usbradio.c (original)
+++ branches/1.6.0/channels/chan_usbradio.c Mon Nov 24 22:05:31 2008
@@ -1028,7 +1028,9 @@
tbuff[i] = ((i16 *)(f->data))[i / 2];
tbuff[i + 1] = o->txkeyed * M_Q13;
}
- fwrite(tbuff, 2, f->datalen, ftxcapraw);
+ if (fwrite(tbuff, 2, f->datalen, ftxcapraw) != f->datalen) {
+ ast_log(LOG_ERROR, "fwrite() failed: %s\n", strerror(errno));
+ }
/*fwrite(f->data,1,f->datalen,ftxcapraw); */
}
#endif
@@ -1041,8 +1043,9 @@
#endif
#if DEBUG_CAPTURES == 1
- if (o->b.txcap2 && ftxcaptrace)
- fwrite((o->pmrChan->ptxDebug), 1, FRAME_SIZE * 2 * 16, ftxcaptrace);
+ if ((o->b.txcap2 && ftxcaptrace) && (fwrite((o->pmrChan->ptxDebug), 1, FRAME_SIZE * 2 * 16, ftxcaptrace) != FRAME_SIZE * 2 * 16)) {
+ ast_log(LOG_ERROR, "fwrite() failed: %s\n", strerror(errno));
+ }
#endif
src = 0; /* read position into f->data */
@@ -1111,8 +1114,9 @@
return f;
#if DEBUG_CAPTURES == 1
- if (o->b.rxcapraw && frxcapraw)
- fwrite((o->usbradio_read_buf + AST_FRIENDLY_OFFSET), 1, FRAME_SIZE * 2 * 2 * 6, frxcapraw);
+ if ((o->b.rxcapraw && frxcapraw) && (fwrite((o->usbradio_read_buf + AST_FRIENDLY_OFFSET), 1, FRAME_SIZE * 2 * 2 * 6, frxcapraw) != FRAME_SIZE * 2 * 2 * 6)) {
+ ast_log(LOG_ERROR, "fwrite() failed: %s\n", strerror(errno));
+ }
#endif
#if 1
@@ -1149,7 +1153,9 @@
#endif
#if DEBUG_CAPTURES == 1
- if (frxcaptrace && o->b.rxcap2) fwrite((o->pmrChan->prxDebug), 1, FRAME_SIZE * 2 * 16, frxcaptrace);
+ if ((frxcaptrace && o->b.rxcap2) && (fwrite((o->pmrChan->prxDebug), 1, FRAME_SIZE * 2 * 16, frxcaptrace) != FRAME_SIZE * 2 * 16)) {
+ ast_log(LOG_ERROR, "fwrite() error: %s\n", strerror(errno));
+ }
#endif
if (o->rxcdtype == CD_HID && (o->pmrChan->rxExtCarrierDetect != o->rxhidsq))
@@ -2423,7 +2429,9 @@
PmrRx(pChan, iBuff, oBuff);
- fwrite((void *)pChan->prxDebug, 2, numSamples * numChannels, hOutput);
+ if (fwrite((void *)pChan->prxDebug, 2, numSamples * numChannels, hOutput) != numSamples * numChannels) {
+ ast_log(LOG_ERROR, "fwrite() failed: %s\n", strerror(errno));
+ }
}
pChan->b.txCapture = 0;
pChan->b.rxCapture = 0;
More information about the asterisk-commits
mailing list