Skip to content
Snippets Groups Projects
Commit 4d1706d0 authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix gross oversights in original ACL patch

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3096 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 4f5ddbc3
Branches
Tags
No related merge requests found
...@@ -93,11 +93,12 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original) ...@@ -93,11 +93,12 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
{ {
struct ast_ha *start=original; struct ast_ha *start=original;
struct ast_ha *ret = NULL; struct ast_ha *ret = NULL;
struct ast_ha *link,*prev; struct ast_ha *link,*prev=NULL;
while(start) { while(start) {
link = ast_duplicate_ha(start); /* Create copy of this object */ link = ast_duplicate_ha(start); /* Create copy of this object */
prev->next = link; /* Link previous to this object */ if (prev)
prev->next = link; /* Link previous to this object */
if (!ret) if (!ret)
ret = link; /* Save starting point */ ret = link; /* Save starting point */
...@@ -112,7 +113,7 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original) ...@@ -112,7 +113,7 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path) struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
{ {
struct ast_ha *ha = malloc(sizeof(struct ast_ha)); struct ast_ha *ha = malloc(sizeof(struct ast_ha));
char *nm; char *nm="255.255.255.255";
char tmp[256] = ""; char tmp[256] = "";
struct ast_ha *prev = NULL; struct ast_ha *prev = NULL;
struct ast_ha *ret; struct ast_ha *ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment