[asterisk-commits] tzafrir: branch group/zapata_conf r84885 - /team/group/zapata_conf/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Oct 5 16:40:52 CDT 2007
Author: tzafrir
Date: Fri Oct 5 16:40:52 2007
New Revision: 84885
URL: http://svn.digium.com/view/asterisk?view=rev&rev=84885
Log:
* Close file decriptors before destroying a struct.
(Is that a good idea?)
* Fix a typo.
Modified:
team/group/zapata_conf/channels/chan_zap.c
Modified: team/group/zapata_conf/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/group/zapata_conf/channels/chan_zap.c?view=diff&rev=84885&r1=84884&r2=84885
==============================================================================
--- team/group/zapata_conf/channels/chan_zap.c (original)
+++ team/group/zapata_conf/channels/chan_zap.c Fri Oct 5 16:40:52 2007
@@ -172,7 +172,7 @@
#define AST_LAW(p) (((p)->law == ZT_LAW_ALAW) ? AST_FORMAT_ALAW : AST_FORMAT_ULAW)
-/*! \brief Signaling types that need to use MF detection should be placed in this macro */
+/*! \brief Signalling types that need to use MF detection should be placed in this macro */
#define NEED_MFDETECT(p) (((p)->sig == SIG_FEATDMF) || ((p)->sig == SIG_FEATDMF_TA) || ((p)->sig == SIG_E911) || ((p)->sig == SIG_FGC_CAMA) || ((p)->sig == SIG_FGC_CAMAMF) || ((p)->sig == SIG_FEATB))
static const char tdesc[] = "Zapata Telephony Driver"
@@ -2483,6 +2483,11 @@
static void destroy_zt_pvt(struct zt_pvt **pvt)
{
struct zt_pvt *p = *pvt;
+
+ /* Close file descriptor, if there still open */
+ if (p->subs[SUB_REAL].zfd > -1)
+ zt_close(p->subs[SUB_REAL].zfd);
+
/* Remove channel from the list */
if (p->prev)
p->prev->next = p->next;
@@ -9959,7 +9964,7 @@
/* Work around broken, out of spec USER_BUSY cause in a progress message */
if (e->proceeding.cause == AST_CAUSE_USER_BUSY) {
if (pri->pvts[chanpos]->owner) {
- ast_verb(3, "PROGRESS with 'user busy' received, signaling AST_CONTROL_BUSY instead of AST_CONTROL_PROGRESS\n");
+ ast_verb(3, "PROGRESS with 'user busy' received, signalling AST_CONTROL_BUSY instead of AST_CONTROL_PROGRESS\n");
pri->pvts[chanpos]->owner->hangupcause = e->proceeding.cause;
f.subclass = AST_CONTROL_BUSY;
More information about the asterisk-commits
mailing list