[asterisk-commits] pcadach: branch pcadach/chan_h323-live r42449 - /team/pcadach/chan_h323-live/...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Sep 8 10:55:38 MST 2006


Author: pcadach
Date: Fri Sep  8 12:55:38 2006
New Revision: 42449

URL: http://svn.digium.com/view/asterisk?rev=42449&view=rev
Log:
Do not send multiple ANSWER messages

Modified:
    team/pcadach/chan_h323-live/channels/chan_h323.c

Modified: team/pcadach/chan_h323-live/channels/chan_h323.c
URL: http://svn.digium.com/view/asterisk/team/pcadach/chan_h323-live/channels/chan_h323.c?rev=42449&r1=42448&r2=42449&view=diff
==============================================================================
--- team/pcadach/chan_h323-live/channels/chan_h323.c (original)
+++ team/pcadach/chan_h323-live/channels/chan_h323.c Fri Sep  8 12:55:38 2006
@@ -189,6 +189,7 @@
 	int DTMFsched;						/* Scheduler descriptor for DTMF */
 	int update_rtp_info;				/* Configuration of fd's array is pending */
 	int recvonly;						/* Peer isn't wish to receive our voice stream */
+	int connection_established;			/* Call got CONNECT message */
 	struct oh323_pvt *next;				/* Next channel in list */
 } *iflist = NULL;
 
@@ -1924,7 +1925,11 @@
 		ast_mutex_unlock(&pvt->lock);
 		return;
 	}
-	update_state(pvt, -1, AST_CONTROL_ANSWER);
+	/* Do not send ANSWER message more than once */
+	if (!pvt->connection_established) {
+		pvt->connection_established = 1;
+		update_state(pvt, -1, AST_CONTROL_ANSWER);
+	}
 	ast_mutex_unlock(&pvt->lock);
 	return;
 }



More information about the asterisk-commits mailing list