Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
d57378d5
Commit
d57378d5
authored
7 years ago
by
Jenkins2
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "app_voicemail: IMAP logout on reload/unload"
parents
58d50025
53b7df82
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/app_voicemail.c
+23
-1
23 additions, 1 deletion
apps/app_voicemail.c
with
23 additions
and
1 deletion
apps/app_voicemail.c
+
23
−
1
View file @
d57378d5
...
@@ -13134,10 +13134,25 @@ static void imap_logout(const char *mailbox_id)
...
@@ -13134,10 +13134,25 @@ static void imap_logout(const char *mailbox_id)
return;
return;
}
}
ast_mutex_lock(&vms->lock);
vms->mailstream = mail_close(vms->mailstream);
vms->mailstream = mail_close(vms->mailstream);
ast_mutex_unlock(&vms->lock);
vmstate_delete(vms);
vmstate_delete(vms);
}
}
static void imap_close_subscribed_mailboxes(void)
{
struct mwi_sub *mwi_sub;
AST_RWLIST_RDLOCK(&mwi_subs);
AST_RWLIST_TRAVERSE(&mwi_subs, mwi_sub, entry) {
if (!ast_strlen_zero(mwi_sub->mailbox)) {
imap_logout(mwi_sub->mailbox);
}
}
AST_RWLIST_UNLOCK(&mwi_subs);
}
#endif
#endif
static int handle_unsubscribe(void *datap)
static int handle_unsubscribe(void *datap)
...
@@ -13591,7 +13606,11 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
...
@@ -13591,7 +13606,11 @@ static int actual_load_config(int reload, struct ast_config *cfg, struct ast_con
strcpy(listen_control_restart_key, DEFAULT_LISTEN_CONTROL_RESTART_KEY);
strcpy(listen_control_restart_key, DEFAULT_LISTEN_CONTROL_RESTART_KEY);
strcpy(listen_control_stop_key, DEFAULT_LISTEN_CONTROL_STOP_KEY);
strcpy(listen_control_stop_key, DEFAULT_LISTEN_CONTROL_STOP_KEY);
/* Free all the users structure */
#ifdef IMAP_STORAGE
imap_close_subscribed_mailboxes();
#endif
/* Free all the users structure */
free_vm_users();
free_vm_users();
/* Free all the zones structure */
/* Free all the zones structure */
...
@@ -14985,6 +15004,9 @@ static int unload_module(void)
...
@@ -14985,6 +15004,9 @@ static int unload_module(void)
ast_unload_realtime("voicemail");
ast_unload_realtime("voicemail");
ast_unload_realtime("voicemail_data");
ast_unload_realtime("voicemail_data");
#ifdef IMAP_STORAGE
imap_close_subscribed_mailboxes();
#endif
free_vm_users();
free_vm_users();
free_vm_zones();
free_vm_zones();
return res;
return res;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment