[asterisk-commits] file: branch group/pimp_my_sip r382544 - /team/group/pimp_my_sip/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 6 16:05:18 CST 2013


Author: file
Date: Wed Mar  6 16:05:14 2013
New Revision: 382544

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382544
Log:
Disable res_sip_endpoint_identifier_constant by default and make it allocate from sorcery so default values get applied.

Modified:
    team/group/pimp_my_sip/res/res_sip_endpoint_identifier_constant.c

Modified: team/group/pimp_my_sip/res/res_sip_endpoint_identifier_constant.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip_endpoint_identifier_constant.c?view=diff&rev=382544&r1=382543&r2=382544
==============================================================================
--- team/group/pimp_my_sip/res/res_sip_endpoint_identifier_constant.c (original)
+++ team/group/pimp_my_sip/res/res_sip_endpoint_identifier_constant.c Wed Mar  6 16:05:14 2013
@@ -19,6 +19,7 @@
  */
 
 /*** MODULEINFO
+	<defaultenabled>no</defaultenabled>
 	<support_level>core</support_level>
  ***/
 
@@ -34,18 +35,13 @@
 static struct ast_sip_endpoint *constant_identify(pjsip_rx_data *rdata)
 {
 	/* This endpoint identifier always returns the same endpoint. It's used
-	 * simply for testing. Most endpoint traits will not be filled in. Mostly
-	 * what we'll have are the location of the endpoint.
-	 *
-	 * Typically, endpoint identifiers would pick an endpoint already allocated
-	 * from a list and return that. Since we don't yet read allocation parameters
-	 * and create endpoints in advance, we'll create one on the fly instead.
+	 * simply for testing. It allocates an endpoint from sorcery so default values
+	 * do get applied.
 	 */
-	struct ast_sip_endpoint *endpoint = ast_sip_endpoint_alloc("constant");
+	struct ast_sip_endpoint *endpoint = ast_sorcery_alloc(ast_sip_get_sorcery(), "endpoint", NULL);
 	if (!endpoint) {
 		return NULL;
 	}
-	ast_string_field_set(endpoint, context, "default");
 	ast_parse_allow_disallow(&endpoint->prefs, endpoint->codecs, "ulaw", 1);
 	return endpoint;
 }




More information about the asterisk-commits mailing list