From: Kern Sibbald Date: Fri, 10 Mar 2017 16:16:03 +0000 (+0100) Subject: Fix bug #2271 where poll interval causes tape mount message to repeat X-Git-Tag: Release-7.4.6~2 X-Git-Url: https://git.sur5r.net/?p=bacula%2Fbacula;a=commitdiff_plain;h=45bb4e59d71ced342d278ca2f060e8d4cffe7a66 Fix bug #2271 where poll interval causes tape mount message to repeat --- diff --git a/bacula/src/stored/askdir.c b/bacula/src/stored/askdir.c index af0da08ca1..84e4c47c13 100644 --- a/bacula/src/stored/askdir.c +++ b/bacula/src/stored/askdir.c @@ -1,7 +1,7 @@ /* Bacula(R) - The Network Backup Solution - Copyright (C) 2000-2016 Kern Sibbald + Copyright (C) 2000-2017 Kern Sibbald The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -850,7 +850,6 @@ bool dir_ask_sysop_to_mount_volume(DCR *dcr, bool write_access) } get_out: - dev->poll = false; jcr->sendJobStatus(JS_Running); Dmsg0(100, "leave dir_ask_sysop_to_mount_volume\n"); return true; diff --git a/bacula/src/stored/wait.c b/bacula/src/stored/wait.c index e664ee5023..655e7570d9 100644 --- a/bacula/src/stored/wait.c +++ b/bacula/src/stored/wait.c @@ -1,7 +1,7 @@ /* Bacula(R) - The Network Backup Solution - Copyright (C) 2000-2016 Kern Sibbald + Copyright (C) 2000-2017 Kern Sibbald The original author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -146,7 +146,7 @@ int wait_for_sysop(DCR *dcr) if (!unmounted && dev->vol_poll_interval && (total_waited >= dev->vol_poll_interval)) { - Dmsg1(dbglvl, "poll return in wait blocked=%s\n", dev->print_blocked()); + Dmsg1(dbglvl, "Set poll=true return in wait blocked=%s\n", dev->print_blocked()); dev->poll = true; /* returning a poll event */ stat = W_POLL; break; @@ -196,7 +196,7 @@ int wait_for_sysop(DCR *dcr) dev->set_blocked(dev->dev_prev_blocked); /* restore entry state */ Dmsg1(dbglvl, "set %s\n", dev->print_blocked()); } - Dmsg1(dbglvl, "Exit blocked=%s\n", dev->print_blocked()); + Dmsg2(dbglvl, "Exit blocked=%s poll=%d\n", dev->print_blocked(), dev->poll); dev->Unlock(); return stat; }