[asterisk-commits] mmichelson: branch mmichelson/pool_shark r381252 - in /team/mmichelson/pool_s...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 11 16:16:39 CST 2013
Author: mmichelson
Date: Mon Feb 11 16:16:36 2013
New Revision: 381252
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=381252
Log:
Address review feedback.
* Log message for failure to push indication task has been improved
* Unref the threadpool during res_sip unloading. Improved refcounting has fixed the previous crash.
* Add documentation to session supplement callbacks about PJSIP functions unavailable.
Modified:
team/mmichelson/pool_shark/channels/chan_gulp.c
team/mmichelson/pool_shark/include/asterisk/res_sip_session.h
team/mmichelson/pool_shark/res/res_sip.c
Modified: team/mmichelson/pool_shark/channels/chan_gulp.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/channels/chan_gulp.c?view=diff&rev=381252&r1=381251&r2=381252
==============================================================================
--- team/mmichelson/pool_shark/channels/chan_gulp.c (original)
+++ team/mmichelson/pool_shark/channels/chan_gulp.c Mon Feb 11 16:16:36 2013
@@ -429,7 +429,8 @@
if (ind_data) {
res = ast_sip_push_task(session->work, indicate, ind_data);
if (res) {
- ast_log(LOG_NOTICE, "Unable to push indication task to the threadpool\n");
+ ast_log(LOG_NOTICE, "Cannot send response code %d to ednpoint %s. Could queue task properly\n",
+ response_code, ast_sorcery_object_get_id(session->endpoint));
ao2_cleanup(ind_data);
}
} else {
Modified: team/mmichelson/pool_shark/include/asterisk/res_sip_session.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/include/asterisk/res_sip_session.h?view=diff&rev=381252&r1=381251&r2=381252
==============================================================================
--- team/mmichelson/pool_shark/include/asterisk/res_sip_session.h (original)
+++ team/mmichelson/pool_shark/include/asterisk/res_sip_session.h Mon Feb 11 16:16:36 2013
@@ -103,11 +103,27 @@
* This method can indicate a failure in processing in its return. If there
* is a failure, it is required that this method sends a response to the request.
* This method is always called from a SIP servant thread.
+ *
+ * \note
+ * The following PJSIP methods will not work properly:
+ * pjsip_rdata_get_dlg()
+ * pjsip_rdata_get_tsx()
+ * The reason is that the rdata passed into this function is a cloned rdata structure,
+ * and its module data is not copied during the cloning operation.
+ * If you need to get the dialog, you can get it via session->inv_session->dlg.
*/
int (*incoming_request)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
/*!
* \brief Called on an incoming SIP response
* This method is always called from a SIP servant thread.
+ *
+ * \note
+ * The following PJSIP methods will not work properly:
+ * pjsip_rdata_get_dlg()
+ * pjsip_rdata_get_tsx()
+ * The reason is that the rdata passed into this function is a cloned rdata structure,
+ * and its module data is not copied during the cloning operation.
+ * If you need to get the dialog, you can get it via session->inv_session->dlg.
*/
void (*incoming_response)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
/*!
Modified: team/mmichelson/pool_shark/res/res_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/pool_shark/res/res_sip.c?view=diff&rev=381252&r1=381251&r2=381252
==============================================================================
--- team/mmichelson/pool_shark/res/res_sip.c (original)
+++ team/mmichelson/pool_shark/res/res_sip.c Mon Feb 11 16:16:36 2013
@@ -709,13 +709,7 @@
*/
ast_sip_push_task_synchronous(NULL, unload_pjsip, NULL);
- /* XXX There is an issue right now that on Asterisk shutdown, res_sip
- * is unloaded before other SIP modules. When those other SIP modules attempt
- * to unregister their services, they rely on the threadpool to be present.
- * So for now, don't shut down the threadpool. Once module dependency stuff is
- * worked out, then this can be uncommented so the threadpool shuts down.
- */
- /* ast_threadpool_shutdown(sip_threadpool); */
+ ast_threadpool_shutdown(sip_threadpool);
return 0;
}
More information about the asterisk-commits
mailing list