[Freeswitch-svn] [commit] r13017 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN anthm at freeswitch.org
Tue Apr 14 09:55:10 PDT 2009


Author: anthm
Date: Tue Apr 14 11:55:10 2009
New Revision: 13017

Log:
move rtp stats up to where they will be more useful

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Tue Apr 14 11:55:10 2009
@@ -411,6 +411,9 @@
 		*tech_pvt->sofia_private->uuid = '\0';
 	}
 	
+
+	sofia_glue_set_rtp_stats(tech_pvt);
+
 	switch_mutex_unlock(tech_pvt->sofia_mutex);
 
 	return SWITCH_STATUS_SUCCESS;

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	Tue Apr 14 11:55:10 2009
@@ -854,3 +854,4 @@
 int sofia_get_loglevel(const char *name);
 sofia_cid_type_t sofia_cid_name2type(const char *name);
 void sofia_glue_tech_set_local_sdp(private_object_t *tech_pvt, const char *sdp_str, switch_bool_t dup);
+void sofia_glue_set_rtp_stats(private_object_t *tech_pvt);

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Tue Apr 14 11:55:10 2009
@@ -1723,6 +1723,17 @@
 	}
 }
 
+void sofia_glue_set_rtp_stats(private_object_t *tech_pvt)
+{
+	if (tech_pvt->rtp_session) {
+        set_stats(tech_pvt->rtp_session, tech_pvt, "audio");
+	}
+
+	if (tech_pvt->video_rtp_session) {
+        set_stats(tech_pvt->video_rtp_session, tech_pvt, "video");
+	}
+}
+
 void sofia_glue_deactivate_rtp(private_object_t *tech_pvt)
 {
 	int loops = 0;
@@ -1734,14 +1745,12 @@
 	}
 
 	if (tech_pvt->rtp_session) {
-		set_stats(tech_pvt->rtp_session, tech_pvt, "audio");
 		switch_rtp_destroy(&tech_pvt->rtp_session);
 	} else if (tech_pvt->local_sdp_audio_port) {
 		switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_audio_port);
 	}
 
 	if (tech_pvt->video_rtp_session) {
-		set_stats(tech_pvt->video_rtp_session, tech_pvt, "video");
 		switch_rtp_destroy(&tech_pvt->video_rtp_session);
 	} else if (tech_pvt->local_sdp_video_port) {
 		switch_rtp_release_port(tech_pvt->profile->rtpip, tech_pvt->local_sdp_video_port);



More information about the Freeswitch-svn mailing list