]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/backup.c
Massive SD calling sequence reorganization
[bacula/bacula] / bacula / src / dird / backup.c
index 11ddbab5acdcc6fe0e1f7ef5a382640ad42120ae..9f7d07c7a90dc9bd8842c92638546229742dc19c 100644 (file)
@@ -67,6 +67,7 @@ int do_backup(JCR *jcr)
    BSOCK   *fd;
    POOL_DBR pr;
    FILESET_DBR fsr;
+   STORE *store;
 
    since[0] = 0;
 
@@ -80,7 +81,7 @@ int do_backup(JCR *jcr)
 
    get_level_since_time(jcr, since, sizeof(since));
 
-   jcr->fname = (char *)get_pool_memory(PM_FNAME);
+   jcr->fname = get_pool_memory(PM_FNAME);
 
    /* 
     * Get the Pool record -- first apply any level defined pools  
@@ -182,11 +183,12 @@ int do_backup(JCR *jcr)
    /* 
     * send Storage daemon address to the File daemon
     */
-   if (jcr->store->SDDport == 0) {
-      jcr->store->SDDport = jcr->store->SDport;
+   store = (STORE *)jcr->storage[0]->first();
+   if (store->SDDport == 0) {
+      store->SDDport = store->SDport;
    }
-   bnet_fsend(fd, storaddr, jcr->store->address, jcr->store->SDDport,
-             jcr->store->enable_ssl);
+   bnet_fsend(fd, storaddr, store->address, store->SDDport,
+             store->enable_ssl);
    if (!response(jcr, fd, OKstore, "Storage", DISPLAY_ERROR)) {
       goto bail_out;
    }