disk_estimates_t *est;
disk_estimates_t *est1;
disk_estimates_t *est_prev;
+ disk_estimates_t *est_next;
char *line = NULL;
char *s, *fp;
int ch;
(void)argc; /* Quiet unused parameter warning */
(void)argv; /* Quiet unused parameter warning */
+ if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+ printf("sendsize-%s\n", VERSION);
+ return (0);
+ }
+
/* initialize */
/*
amandates_started = FALSE;
}
+ est_prev = NULL;
+ for(est = est_list; est != NULL; est = est_next) {
+ int good = merge_dles_properties(est->dle, 0);
+ est_next = est->next;
+ if (!good) {
+ if (est == est_list) {
+ est_list = est_next;
+ } else {
+ est_prev->next = est_next;
+ }
+ } else {
+ est_prev = est;
+ }
+ }
for(est = est_list; est != NULL; est = est->next) {
run_client_scripts(EXECUTE_ON_PRE_HOST_ESTIMATE, g_options, est->dle,
stdout);
amfree(est->qamdevice);
amfree(est->dirname);
amfree(est->qdirname);
- if(est->dle) {
-/* free DLE */
+ if (est->dle) {
+ free_dle(est->dle);
}
}
if (est->dle->data_path == DATA_PATH_AMANDA &&
(bsu->data_path_set & DATA_PATH_AMANDA)==0) {
g_printf("%s %d ERROR application %s doesn't support amanda data-path\n", est->qamname, 0, est->dle->program);
+ amfree(bsu);
return;
}
if (est->dle->data_path == DATA_PATH_DIRECTTCP &&
(bsu->data_path_set & DATA_PATH_DIRECTTCP)==0) {
g_printf("%s %d ERROR application %s doesn't support directtcp data-path\n", est->qamname, 0, est->dle->program);
+ amfree(bsu);
return;
}
}
}
- if (nb_level == 0)
+ if (nb_level == 0) {
+ amfree(bsu);
return;
+ }
if (bsu->multi_estimate) {
for (i=0;i<nb_level;i++) {
}
}
}
+
+ amfree(bsu);
}
char *file_include = NULL;
times_t start_time;
FILE *dumpout = NULL;
- off_t size = (off_t)1;
char *line = NULL;
char *match_expr;
amwait_t wait_status;
}
match_expr = vstralloc(" %d SIZE %lld", NULL);
len = strlen(est->qamname);
- for(size = (off_t)-1; (line = agets(dumpout)) != NULL; free(line)) {
+ for(; (line = agets(dumpout)) != NULL; free(line)) {
long long size_ = (long long)0;
if (line[0] == '\0' || (int)strlen(line) <= len)
continue;
level,
size_);
}
- size = (off_t)size_;
}
amfree(match_expr);