]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
fix a bogus datalen in the frames generated by app_sms
authorLuigi Rizzo <rizzo@icir.org>
Tue, 19 Dec 2006 21:03:02 +0000 (21:03 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Tue, 19 Dec 2006 21:03:02 +0000 (21:03 +0000)
(causing noisy output if you listen to the output!)

This affects trunk as well, whereas 1.2 is ok.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@48583 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_sms.c

index 5eb0f9f8504aaa8a010063f832b0244f8be16738..d56ada4fc0f820fec912cef9dd928d36dd1bfbb4 100644 (file)
@@ -1198,7 +1198,7 @@ static int sms_generate (struct ast_channel *chan, void *data, int len, int samp
 #else
        f.subclass = AST_FORMAT_SLINEAR;
 #endif
-       f.datalen = len;
+       f.datalen = samples * SAMPLE2LEN;
        f.offset = AST_FRIENDLY_OFFSET;
        f.mallocd = 0;
        f.data = buf;