mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
Update ast_append_ha() usage
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@51221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1425,7 +1425,11 @@ static struct oh323_user *build_user(char *name, struct ast_variable *v, struct
|
|||||||
}
|
}
|
||||||
} else if (!strcasecmp(v->name, "permit") ||
|
} else if (!strcasecmp(v->name, "permit") ||
|
||||||
!strcasecmp(v->name, "deny")) {
|
!strcasecmp(v->name, "deny")) {
|
||||||
user->ha = ast_append_ha(v->name, v->value, user->ha, NULL);
|
int ha_error = 0;
|
||||||
|
|
||||||
|
user->ha = ast_append_ha(v->name, v->value, user->ha, &ha_error);
|
||||||
|
if (ha_error)
|
||||||
|
ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!user->options.dtmfmode)
|
if (!user->options.dtmfmode)
|
||||||
@@ -1529,7 +1533,11 @@ static struct oh323_peer *build_peer(const char *name, struct ast_variable *v, s
|
|||||||
peer->addr.sin_port = htons(atoi(v->value));
|
peer->addr.sin_port = htons(atoi(v->value));
|
||||||
} else if (!strcasecmp(v->name, "permit") ||
|
} else if (!strcasecmp(v->name, "permit") ||
|
||||||
!strcasecmp(v->name, "deny")) {
|
!strcasecmp(v->name, "deny")) {
|
||||||
peer->ha = ast_append_ha(v->name, v->value, peer->ha);
|
int ha_error = 0;
|
||||||
|
|
||||||
|
peer->ha = ast_append_ha(v->name, v->value, peer->ha, &ha_error);
|
||||||
|
if (ha_error)
|
||||||
|
ast_log(LOG_ERROR, "Bad ACL entry in configuration line %d : %s\n", v->lineno, v->value);
|
||||||
} else if (!strcasecmp(v->name, "mailbox")) {
|
} else if (!strcasecmp(v->name, "mailbox")) {
|
||||||
ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox));
|
ast_copy_string(peer->mailbox, v->value, sizeof(peer->mailbox));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user