X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Fdiskfile.c;h=71e2ef55cb7a54a656e949288e5a44dd2883fe43;hb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;hp=8a67cbd51de35d57725b5c6a29decf1290ae2555;hpb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;p=debian%2Famanda diff --git a/server-src/diskfile.c b/server-src/diskfile.c index 8a67cbd..71e2ef5 100644 --- a/server-src/diskfile.c +++ b/server-src/diskfile.c @@ -89,6 +89,12 @@ end: return config_errors(NULL); } +am_host_t * +get_hostlist(void) +{ + return hostlist; +} + am_host_t * lookup_host( const char *hostname) @@ -703,6 +709,7 @@ parse_diskline( disk->comprate[0] = dumptype_get_comprate(dtype)[0]; disk->comprate[1] = dumptype_get_comprate(dtype)[1]; disk->data_path = dumptype_get_data_path(dtype); + disk->dump_limit = dumptype_get_dump_limit(dtype); /* * Boolean parameters with no value (Appears here as value 2) defaults @@ -1584,6 +1591,7 @@ xml_application( { char *plugin; char *b64plugin; + char *client_name; xml_app_t xml_app; proplist_t proplist; @@ -1597,6 +1605,13 @@ xml_application( proplist = application_get_property(application); g_hash_table_foreach(proplist, xml_property, &xml_app); + client_name = application_get_client_name(application); + if (client_name && strlen(client_name) > 0 && + am_has_feature(their_features, fe_application_client_name)) { + char *b64client_name = amxml_format_tag("client_name", client_name); + vstrextend(&xml_app.result, " ", b64client_name, "\n", NULL); + } + vstrextend(&xml_app.result, " \n", NULL); amfree(b64plugin); @@ -1612,6 +1627,7 @@ xml_scripts( { char *plugin; char *b64plugin; + char *client_name; char *xml_scr; char *xml_scr1; char *str = ""; @@ -1648,7 +1664,7 @@ xml_scripts( execute_on = pp_script_get_execute_on(pp_script); sep = ""; - eo_str = NULL; + eo_str = stralloc(""); if (execute_on & EXECUTE_ON_PRE_DLE_AMCHECK) { eo_str = vstrextend(&eo_str, sep, "PRE-DLE-AMCHECK", NULL); sep = ","; @@ -1725,6 +1741,15 @@ xml_scripts( proplist = pp_script_get_property(pp_script); xml_app.result = stralloc(""); g_hash_table_foreach(proplist, xml_property, &xml_app); + + client_name = pp_script_get_client_name(pp_script); + if (client_name && strlen(client_name) > 0 && + am_has_feature(their_features, fe_script_client_name)) { + char *b64client_name = amxml_format_tag("client_name", + client_name); + vstrextend(&xml_app.result, " ", b64client_name, "\n", NULL); + } + xml_scr = vstrextend(&xml_scr, xml_scr1, xml_app.result, " \n", NULL); amfree(b64plugin); amfree(xml_app.result); @@ -1793,10 +1818,13 @@ match_disklist( dp->todo = 1; match_a_disk = 1; prev_match = 0; - } else { /* dp->todo == 0 */ + } else if (dp->todo == 0) { match_a_disk = 1; prev_match = 0; dp_skip = dp; + } else { /* dp->todo == 1 */ + match_a_disk = 1; + prev_match = 0; } } }