[asterisk-commits] file: branch file/gulp_fax r394475 - /team/file/gulp_fax/res/res_sip_t38.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jul 16 14:17:41 CDT 2013


Author: file
Date: Tue Jul 16 14:17:38 2013
New Revision: 394475

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=394475
Log:
Move stuff around so T.38 is enabled on local reinvites. Yay!

Modified:
    team/file/gulp_fax/res/res_sip_t38.c

Modified: team/file/gulp_fax/res/res_sip_t38.c
URL: http://svnview.digium.com/svn/asterisk/team/file/gulp_fax/res/res_sip_t38.c?view=diff&rev=394475&r1=394474&r2=394475
==============================================================================
--- team/file/gulp_fax/res/res_sip_t38.c (original)
+++ team/file/gulp_fax/res/res_sip_t38.c Tue Jul 16 14:17:38 2013
@@ -612,15 +612,6 @@
 		return -1;
 	}
 
-	if (t38_initialize_session(session, session_media)) {
-		return -1;
-	}
-
-	if (session->t38state == T38_LOCAL_REINVITE) {
-		t38_interpret_sdp(state, session, session_media, stream);
-		t38_change_state(session, session_media, state, T38_ENABLED);
-	}
-
 	return 1;
 }
 
@@ -735,9 +726,14 @@
 {
 	RAII_VAR(struct ast_sockaddr *, addrs, NULL, ast_free_ptr);
 	char host[NI_MAXHOST];
+	struct t38_state *state;
 
 	if (!session_media->udptl) {
 		return 0;
+	}
+
+	if (!(state = t38_state_get_or_alloc(session))) {
+		return -1;
 	}
 
 	ast_copy_pj_str(host, remote_stream->conn ? &remote_stream->conn->addr : &remote->conn->addr, sizeof(host));
@@ -750,6 +746,11 @@
 
 	ast_sockaddr_set_port(addrs, remote_stream->desc.port);
 	ast_udptl_set_peer(session_media->udptl, addrs);
+
+	if (session->t38state == T38_LOCAL_REINVITE) {
+		t38_interpret_sdp(state, session, session_media, remote_stream);
+		t38_change_state(session, session_media, state, T38_ENABLED);
+	}
 
 	return 0;
 }




More information about the asterisk-commits mailing list