[asterisk-commits] file: branch group/media_formats-reviewed-trunk r418652 - /team/group/media_f...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jul 15 12:48:46 CDT 2014
Author: file
Date: Tue Jul 15 12:48:42 2014
New Revision: 418652
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=418652
Log:
res_fax: Compare the format in received audio frames correctly.
Review: https://reviewboard.asterisk.org/r/3792/
Modified:
team/group/media_formats-reviewed-trunk/res/res_fax.c
Modified: team/group/media_formats-reviewed-trunk/res/res_fax.c
URL: http://svnview.digium.com/svn/asterisk/team/group/media_formats-reviewed-trunk/res/res_fax.c?view=diff&rev=418652&r1=418651&r2=418652
==============================================================================
--- team/group/media_formats-reviewed-trunk/res/res_fax.c (original)
+++ team/group/media_formats-reviewed-trunk/res/res_fax.c Tue Jul 15 12:48:42 2014
@@ -1354,7 +1354,7 @@
int timeout = RES_FAX_TIMEOUT;
int chancount;
unsigned int expected_frametype = -1;
- struct ast_frame_subclass expected_framesubclass = { .integer = -1 };
+ struct ast_frame_subclass expected_framesubclass = { .integer = 0, };
unsigned int t38negotiated = (ast_channel_get_t38_state(chan) == T38_STATE_NEGOTIATED);
struct ast_control_t38_parameters t38_parameters;
const char *tempvar;
@@ -1506,8 +1506,10 @@
ast_verb(3, "Channel '%s' switched to T.38 FAX session '%u'.\n", ast_channel_name(chan), fax->id);
}
- } else if ((frame->frametype == expected_frametype) &&
- (!memcmp(&frame->subclass, &expected_framesubclass, sizeof(frame->subclass)))) {
+ } else if ((frame->frametype == expected_frametype) && (expected_framesubclass.integer == frame->subclass.integer) &&
+ ((!frame->subclass.format && !expected_framesubclass.format) ||
+ (frame->subclass.format && expected_framesubclass.format &&
+ (ast_format_cmp(frame->subclass.format, expected_framesubclass.format) != AST_FORMAT_CMP_NOT_EQUAL)))) {
struct ast_frame *f;
if (fax->smoother) {
More information about the asterisk-commits
mailing list