summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2016-08-23 10:39:01 -0500
committerRichard Mudgett <rmudgett@digium.com>2016-08-25 17:13:53 -0500
commite8d4f400226b9cb3110f287e15ca9521fc8af1e7 (patch)
tree5e048038f32583dfe93874710d844d36c29a0503 /include
parent35cf6c7702665af14e00bea0a5439137952b8aec (diff)
res_fax: Fix deadlock setting FAXMODE channel variable.
ASTERISK-25980 added the FAXMODE channel variable to res_fax.c. Unfortunately, it also introduced a deadlock potential because set_channel_variables() which sets FAXMODE can be called during a masquerade. The ast_channel_get_t38_state() which gets the value used to set FAXMODE cannot be called with the channel locked. As a result, local channels can deadlock because of how they must acquire the locks necessary to operate. The intent of FAXMODE is for dialplan to know how a fax was transferred after the fax completes. However, the previous patch sets FAXMODE to the channel's current T.38 state AFTER the fax has completed and where T.38 may have already disconnected. * Set FAXMODE based upon T.38 negotiations exchanged either with the fax applications or the fax framehooks. ASTERISK-26203 Reported by: Etienne Lessard ASTERISK-24822 Reported by: David Brillert ASTERISK-22732 Reported by: Richard Mudgett Change-Id: Id525747254b64c1efe8b1b5973d52ff9719c2ae1
Diffstat (limited to 'include')
-rw-r--r--include/asterisk/res_fax.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/asterisk/res_fax.h b/include/asterisk/res_fax.h
index 5119bfa6c..e88d8002f 100644
--- a/include/asterisk/res_fax.h
+++ b/include/asterisk/res_fax.h
@@ -20,16 +20,16 @@
#ifndef _ASTERISK_RES_FAX_H
#define _ASTERISK_RES_FAX_H
-#include <asterisk.h>
-#include <asterisk/lock.h>
-#include <asterisk/linkedlists.h>
-#include <asterisk/module.h>
-#include <asterisk/utils.h>
-#include <asterisk/options.h>
-#include <asterisk/frame.h>
-#include <asterisk/cli.h>
-#include <asterisk/stringfields.h>
-#include <asterisk/manager.h>
+#include "asterisk.h"
+#include "asterisk/lock.h"
+#include "asterisk/linkedlists.h"
+#include "asterisk/module.h"
+#include "asterisk/utils.h"
+#include "asterisk/options.h"
+#include "asterisk/frame.h"
+#include "asterisk/cli.h"
+#include "asterisk/stringfields.h"
+#include "asterisk/manager.h"
/*! \brief capabilities for res_fax to locate a fax technology module */
enum ast_fax_capabilities {
@@ -187,6 +187,8 @@ struct ast_fax_session_details {
int faxdetect_timeout;
/*! flags used for fax detection */
int faxdetect_flags;
+ /*! Non-zero if T.38 is negotiated */
+ int is_t38_negotiated;
};
struct ast_fax_tech;