+ Jmsg0(jcr, M_FATAL, 0, "Can't get batch sql connexion");
+ return false; /* Fail */
+ }
+
+ if (jcr->HasBase) {
+ jcr->nb_base_files = str_to_int64(nb.list);
+ if (!db_create_base_file_list(jcr, jcr->db, jobids.list)) {
+ Jmsg1(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
+ return false;
+ }
+ if (!db_get_base_file_list(jcr, jcr->db, jcr->use_accurate_chksum,
+ accurate_list_handler, (void *)jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db));
+ return false;
+ }
+
+ } else {
+ if (!db_get_file_list(jcr, jcr->db_batch,
+ jobids.list, jcr->use_accurate_chksum, false /* no delta */,
+ accurate_list_handler, (void *)jcr)) {
+ Jmsg1(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db_batch));
+ return false;
+ }
+ }
+
+ /* TODO: close the batch connection ? (can be used very soon) */
+ jcr->file_bsock->signal(BNET_EOD);
+ return true;
+}
+
+bool send_store_addr_to_fd(JCR *jcr, STORE *store,
+ char *store_address, uint32_t store_port)
+{
+ int tls_need = BNET_TLS_NONE;
+
+ /* TLS Requirement */
+ if (store->tls_enable) {
+ if (store->tls_require) {
+ tls_need = BNET_TLS_REQUIRED;
+ } else {
+ tls_need = BNET_TLS_OK;
+ }
+ }
+
+ /*
+ * Send Storage address to the FD
+ */
+ jcr->file_bsock->fsend(storaddr, store_address, store_port, tls_need);
+ if (!response(jcr, jcr->file_bsock, OKstore, "Storage", DISPLAY_ERROR)) {