[asterisk-commits] file: branch file/mf-attributes r417752 - /team/file/mf-attributes/main/format.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 2 06:48:11 CDT 2014


Author: file
Date: Wed Jul  2 06:48:04 2014
New Revision: 417752

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=417752
Log:
Tweak behavior to match the old one. If a format interface is not available or it is incomplete when setting attributes or parsing SDP return a cloned copy of the passed-in format.

Modified:
    team/file/mf-attributes/main/format.c

Modified: team/file/mf-attributes/main/format.c
URL: http://svnview.digium.com/svn/asterisk/team/file/mf-attributes/main/format.c?view=diff&rev=417752&r1=417751&r2=417752
==============================================================================
--- team/file/mf-attributes/main/format.c (original)
+++ team/file/mf-attributes/main/format.c Wed Jul  2 06:48:04 2014
@@ -282,8 +282,8 @@
 		ao2_ref(interface, +1);
 	}
 
-	if (!interface->format_attribute_set) {
-		return NULL;
+	if (!interface || !interface->format_attribute_set) {
+		return ast_format_clone(format);
 	}
 
 	return interface->format_attribute_set(format, name, value);
@@ -303,8 +303,8 @@
 		ao2_ref(interface, +1);
 	}
 
-	if (!interface->format_sdp_parse) {
-		return NULL;
+	if (!interface || !interface->format_sdp_parse) {
+		return ast_format_clone(format);
 	}
 
 	return interface->format_sdp_parse(format, attributes);




More information about the asterisk-commits mailing list