Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'bareos-15.2' into bareos-16.2
  • Loading branch information
Marco van Wieringen committed Aug 19, 2016
2 parents 5a4c362 + 8063e75 commit 183fa09
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/dird/ua.h
Expand Up @@ -172,6 +172,7 @@ class RUN_CTX {
int Priority;
int files;
bool level_override;
bool pool_override;
bool spool_data;
bool accurate;
bool ignoreduplicatecheck;
Expand Down
3 changes: 2 additions & 1 deletion src/dird/ua_input.c
Expand Up @@ -2,6 +2,7 @@
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2001-2010 Free Software Foundation Europe e.V.
Copyright (C) 2016-2016 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -47,7 +48,7 @@ bool get_cmd(UAContext *ua, const char *prompt, bool subprompt)
if (!subprompt && ua->api) {
sock->signal(BNET_TEXT_INPUT);
}
sock->fsend("%s", prompt);
ua->send_msg("%s", prompt);
if (!ua->api || subprompt) {
sock->signal(BNET_SUB_PROMPT);
}
Expand Down
3 changes: 2 additions & 1 deletion src/dird/ua_run.c
Expand Up @@ -600,7 +600,7 @@ int modify_job_parameters(UAContext *ua, JCR *jcr, RUN_CTX &rc)
select_job_level(ua, jcr);
switch (jcr->getJobType()) {
case JT_BACKUP:
if (!jcr->is_JobLevel(L_VIRTUAL_FULL)) {
if (!rc.pool_override && !jcr->is_JobLevel(L_VIRTUAL_FULL)) {
apply_pool_overrides(jcr, true);
rc.pool = jcr->res.pool;
rc.level_override = true;
Expand Down Expand Up @@ -691,6 +691,7 @@ int modify_job_parameters(UAContext *ua, JCR *jcr, RUN_CTX &rc)
if (rc.pool) {
jcr->res.pool = rc.pool;
rc.level_override = false;
rc.pool_override = true;
Dmsg1(100, "Set new pool=%s\n", jcr->res.pool->name());
goto try_again;
}
Expand Down
12 changes: 6 additions & 6 deletions src/findlib/find_one.c
Expand Up @@ -217,7 +217,7 @@ static inline bool no_dump(JCR *jcr, FF_PKT *ff_pkt)
*/
static inline bool check_size_matching(JCR *jcr, FF_PKT *ff_pkt)
{
ssize_t begin_size, end_size, difference;
int64_t begin_size, end_size, difference;

/*
* See if size matching is turned on.
Expand All @@ -242,7 +242,7 @@ static inline bool check_size_matching(JCR *jcr, FF_PKT *ff_pkt)
/*
* Calculate the fraction this size is of the wanted size.
*/
if ((ssize_t)ff_pkt->statp.st_size > begin_size) {
if ((int64_t)ff_pkt->statp.st_size > begin_size) {
difference = ff_pkt->statp.st_size - begin_size;
} else {
difference = begin_size - ff_pkt->statp.st_size;
Expand All @@ -253,12 +253,12 @@ static inline bool check_size_matching(JCR *jcr, FF_PKT *ff_pkt)
*/
return (difference < (begin_size / 100));
case size_match_smaller:
return (ssize_t)ff_pkt->statp.st_size < begin_size;
return (int64_t)ff_pkt->statp.st_size < begin_size;
case size_match_greater:
return (ssize_t)ff_pkt->statp.st_size > begin_size;
return (int64_t)ff_pkt->statp.st_size > begin_size;
case size_match_range:
return ((ssize_t)ff_pkt->statp.st_size >= begin_size) &&
((ssize_t)ff_pkt->statp.st_size <= end_size);
return ((int64_t)ff_pkt->statp.st_size >= begin_size) &&
((int64_t)ff_pkt->statp.st_size <= end_size);
default:
return true;
}
Expand Down

0 comments on commit 183fa09

Please sign in to comment.