mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Fix for potential crash with vmexten
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2770,6 +2770,9 @@ static struct skinny_device *build_device(const char *cat, struct ast_variable *
|
||||
d->prefs = default_prefs;
|
||||
if (!ast_strlen_zero(vmexten))
|
||||
ast_copy_string(device_vmexten, vmexten, sizeof(device_vmexten));
|
||||
else
|
||||
memset(device_vmexten, 0, sizeof(device_vmexten));
|
||||
|
||||
while(v) {
|
||||
if (!strcasecmp(v->name, "host")) {
|
||||
if (ast_get_ip(&d->addr, v->value)) {
|
||||
@@ -2904,8 +2907,7 @@ static struct skinny_device *build_device(const char *cat, struct ast_variable *
|
||||
ast_copy_string(l->mailbox, mailbox, sizeof(l->mailbox));
|
||||
if (!ast_strlen_zero(mailbox))
|
||||
ast_verb(3, "Setting mailbox '%s' on %s@%s\n", mailbox, d->name, l->name);
|
||||
if (!ast_strlen_zero(device_vmexten))
|
||||
ast_copy_string(l->vmexten, device_vmexten, sizeof(vmexten));
|
||||
ast_copy_string(l->vmexten, device_vmexten, sizeof(vmexten));
|
||||
l->chanvars = chanvars;
|
||||
l->msgstate = -1;
|
||||
l->capability = d->capability;
|
||||
|
Reference in New Issue
Block a user