[Asterisk-cvs] asterisk/apps app_test.c,1.3,1.4
markster at lists.digium.com
markster at lists.digium.com
Wed Sep 22 08:11:26 CDT 2004
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv19710/apps
Modified Files:
app_test.c
Log Message:
Check to be sure # of samples is > 0...
Index: app_test.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_test.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- app_test.c 19 Sep 2004 16:17:17 -0000 1.3
+++ app_test.c 22 Sep 2004 12:15:00 -0000 1.4
@@ -88,6 +88,10 @@
}
if (res < 0)
return res;
+ if (!samples) {
+ ast_log(LOG_NOTICE, "No samples were received from the other side!\n");
+ return -1;
+ }
ast_log(LOG_DEBUG, "%s: Noise: %d, samples: %d, avg: %d\n", who, noise, samples, noise / samples);
return (noise / samples);
}
More information about the svn-commits
mailing list