projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78531a0
)
Check to be sure # of samples is > 0...
author
Mark Spencer
<markster@digium.com>
Wed, 22 Sep 2004 12:15:00 +0000
(12:15 +0000)
committer
Mark Spencer
<markster@digium.com>
Wed, 22 Sep 2004 12:15:00 +0000
(12:15 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3818
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
apps/app_test.c
patch
|
blob
|
history
diff --git
a/apps/app_test.c
b/apps/app_test.c
index
90af93c
..
3743b67
100755
(executable)
--- a/
apps/app_test.c
+++ b/
apps/app_test.c
@@
-88,6
+88,10
@@
static int measurenoise(struct ast_channel *chan, int ms, char *who)
}
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);
}