X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Famxml.c;h=ba7f951923af8dbaee4fe20f3eeca60b836253aa;hb=d28952249e392eb31bc8eecc53f6c477f30c617b;hp=7aab3f6d41f4faae4c3347b1fe958aa5a855e7ac;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/common-src/amxml.c b/common-src/amxml.c index 7aab3f6..ba7f951 100644 --- a/common-src/amxml.c +++ b/common-src/amxml.c @@ -1,6 +1,7 @@ /* * Amanda, The Advanced Maryland Automatic Network Disk Archiver * Copyright (c) 1991-1998 University of Maryland at College Park + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. * All Rights Reserved. * * Permission to use, copy, modify, distribute, and sell this software and its @@ -60,7 +61,7 @@ typedef struct amgxml_s { property_t *property_data; proplist_t property; script_t *script; - level_t *alevel; + am_level_t *alevel; char *encoding; char *raw; } amgxml_t; @@ -257,6 +258,7 @@ amstart_element( g_hash_table_new_full(g_str_hash, g_str_equal, &g_free, &free_property_t); data_user->script = NULL; data_user->alevel = NULL; + data_user->dle->property = data_user->property; data_user->encoding = NULL; data_user->raw = NULL; } else if(strcmp(element_name, "disk" ) == 0 || @@ -315,7 +317,7 @@ amstart_element( if (strcmp(element_name, "exclude") == 0 || strcmp(element_name, "include") == 0) data_user->has_optional = 0; if (strcmp(element_name, "level") == 0) { - data_user->alevel = g_new0(level_t, 1); + data_user->alevel = g_new0(am_level_t, 1); } } else if (strcmp(element_name, "server") == 0) { if (strcmp(last_element_name, "level") != 0) { @@ -555,7 +557,7 @@ amtext( } last_element_name = last_element->data; - tt = malloc(text_len + 1); + tt = malloc(text_len + 8 + 1); strncpy(tt,text,text_len); tt[text_len] = '\0';