[asterisk-commits] file: branch mmichelson/pub_sub r385256 - /team/mmichelson/pub_sub/res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 10 12:41:42 CDT 2013


Author: file
Date: Wed Apr 10 12:41:40 2013
New Revision: 385256

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385256
Log:
Get res_sip_pubsub building.

Modified:
    team/mmichelson/pub_sub/res/res_sip_pubsub.c

Modified: team/mmichelson/pub_sub/res/res_sip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pub_sub/res/res_sip_pubsub.c?view=diff&rev=385256&r1=385255&r2=385256
==============================================================================
--- team/mmichelson/pub_sub/res/res_sip_pubsub.c (original)
+++ team/mmichelson/pub_sub/res/res_sip_pubsub.c Wed Apr 10 12:41:40 2013
@@ -53,6 +53,8 @@
 
 #define DATASTORE_BUCKETS 53
 
+#define DEFAULT_EXPIRES 3600
+
 static int datastore_hash(const void *obj, int flags)
 {
 	const struct ast_datastore *datastore = obj;
@@ -288,8 +290,11 @@
 
 	pjsip_evsub_register_pkg(&sub_module, &event, DEFAULT_EXPIRES, i, accept);
 
-	SCOPED_LOCK(lock, &subscription_handlers, AST_RWLIST_WRLOCK, AST_RWLIST_UNLOCK);
-	AST_RWLIST_INSERT_TAIL(&subscription_handlers, handler, next);
+	{
+		SCOPED_LOCK(lock, &subscription_handlers, AST_RWLIST_WRLOCK, AST_RWLIST_UNLOCK);
+		AST_RWLIST_INSERT_TAIL(&subscription_handlers, handler, next);
+	}
+
 	ast_module_ref(ast_module_info->self);
 	return 0;
 }
@@ -526,7 +531,7 @@
 
 static int load_module(void)
 {
-	pjsip_evsub_init_module(ast_sip_pjsip_endpoint());
+	pjsip_evsub_init_module(ast_sip_get_pjsip_endpoint());
 	if (ast_sip_register_service(&sub_module)) {
 		return AST_MODULE_LOAD_DECLINE;
 	}




More information about the asterisk-commits mailing list