[asterisk-commits] qwell: trunk r43470 - in /trunk: ./
channels/chan_skinny.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Sep 21 20:09:23 MST 2006
Author: qwell
Date: Thu Sep 21 22:09:22 2006
New Revision: 43470
URL: http://svn.digium.com/view/asterisk?rev=43470&view=rev
Log:
Merged revisions 43469 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r43469 | qwell | 2006-09-21 20:01:16 -0700 (Thu, 21 Sep 2006) | 4 lines
First shot at unload_module in chan_skinny..
More to come.
........
Modified:
trunk/ (props changed)
trunk/channels/chan_skinny.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-1.4-merged (original)
+++ branch-1.4-merged Thu Sep 21 22:09:22 2006
@@ -1,1 +1,1 @@
-/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466
+/branches/1.4:1-43376,43383,43386,43388,43392,43396,43405,43410,43422,43441,43445,43450,43454,43456,43464,43466,43469
Modified: trunk/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_skinny.c?rev=43470&r1=43469&r2=43470&view=diff
==============================================================================
--- trunk/channels/chan_skinny.c (original)
+++ trunk/channels/chan_skinny.c Thu Sep 21 22:09:22 2006
@@ -4521,52 +4521,40 @@
static int unload_module(void)
{
-#if 0
- struct skinnysession *s;
-
- /* close all IP connections */
- if (!ast_mutex_lock(&devicelock)) {
- /* Terminate tcp listener thread */
- } else {
- ast_log(LOG_WARNING, "Unable to lock the monitor\n");
- return -1;
- }
- if (!ast_mutex_lock(&monlock)) {
- if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
- pthread_cancel(monitor_thread);
- pthread_kill(monitor_thread, SIGURG);
- pthread_join(monitor_thread, NULL);
- }
- monitor_thread = AST_PTHREADT_STOP;
- ast_mutex_unlock(&monlock);
- } else {
- ast_log(LOG_WARNING, "Unable to lock the monitor\n");
- return -1;
- }
- if (!ast_mutex_lock(&iflock)) {
- /* Destroy all the interfaces and free their memory */
- p = iflist;
- while(p) {
- pl = p;
- p = p->next;
- /* Free associated memory */
- ast_mutex_destroy(&pl->lock);
- free(pl);
- }
- iflist = NULL;
- ast_mutex_unlock(&iflock);
- } else {
- ast_log(LOG_WARNING, "Unable to lock the monitor\n");
- return -1;
- }
+ delete_devices();
+
+ ast_mutex_lock(&monlock);
+ if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
+ pthread_cancel(monitor_thread);
+ pthread_kill(monitor_thread, SIGURG);
+ pthread_join(monitor_thread, NULL);
+ }
+ monitor_thread = AST_PTHREADT_STOP;
+ ast_mutex_unlock(&monlock);
+
+#if 0 /* XXX This is...funky. Will fix shortly */
+ ast_mutex_lock(&sessionlock);
+ /* Destroy all the interfaces and free their memory */
+ p = iflist;
+ while(p) {
+ pl = p;
+ p = p->next;
+ /* Free associated memory */
+ ast_mutex_destroy(&pl->lock);
+ free(pl);
+ }
+ iflist = NULL;
+ ast_mutex_unlock(&sessionlock);
+#endif
ast_rtp_proto_unregister(&skinny_rtp);
ast_channel_unregister(&skinny_tech);
ast_cli_unregister_multiple(cli_skinny, sizeof(cli_skinny) / sizeof(struct ast_cli_entry));
+ close(skinnysock);
+ sched_context_destroy(sched);
+
return 0;
-#endif
- return -1;
}
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_DEFAULT, "Skinny Client Control Protocol (Skinny)",
More information about the asterisk-commits
mailing list