[svn-commits] file: branch file/pimp_my_publish r391770 - /team/file/pimp_my_publish/res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Jun 14 09:34:28 CDT 2013


Author: file
Date: Fri Jun 14 09:34:26 2013
New Revision: 391770

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391770
Log:
Add PUBLISH to allowed methods.

Modified:
    team/file/pimp_my_publish/res/res_sip_pubsub.c

Modified: team/file/pimp_my_publish/res/res_sip_pubsub.c
URL: http://svnview.digium.com/svn/asterisk/team/file/pimp_my_publish/res/res_sip_pubsub.c?view=diff&rev=391770&r1=391769&r2=391770
==============================================================================
--- team/file/pimp_my_publish/res/res_sip_pubsub.c (original)
+++ team/file/pimp_my_publish/res/res_sip_pubsub.c Fri Jun 14 09:34:26 2013
@@ -1066,6 +1066,8 @@
 
 static int load_module(void)
 {
+	static const pj_str_t str_PUBLISH = { "PUBLISH", 7 };
+
 	pjsip_evsub_init_module(ast_sip_get_pjsip_endpoint());
 
 	if (!(sched = ast_sched_context_create())) {
@@ -1078,6 +1080,8 @@
 		ast_sched_context_destroy(sched);
 		return AST_MODULE_LOAD_FAILURE;
 	}
+
+	pjsip_endpt_add_capability(ast_sip_get_pjsip_endpoint(), NULL, PJSIP_H_ALLOW, NULL, 1, &str_PUBLISH);
 
 	if (ast_sip_register_service(&pubsub_module)) {
 		ast_log(LOG_ERROR, "Could not register pubsub service\n");




More information about the svn-commits mailing list