Changeset 2628


Ignore:
Timestamp:
May 11, 2010, 3:44:28 AM (9 years ago)
Author:
bruno
Message:
  • netfs_proto should be initialized in every case, not just in DR (should solve remaining NULL reports)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-devices.c

    r2613 r2628  
    23672367            }
    23682368        }
     2369        /*  Force NFS to be the protocol by default */
     2370        if (bkpinfo->netfs_proto == NULL) {
     2371            mr_asprintf(&(bkpinfo->netfs_proto), "nfs");
     2372        }
    23692373        if (bkpinfo->disaster_recovery) {
    23702374            sprintf(command ,"umount %s/isodir 2> /dev/null", bkpinfo->tmpdir);
    23712375            (void)system(command);
    2372             /*  Force NFS to be the protocol by default */
    2373             if (bkpinfo->netfs_proto == NULL) {
    2374                 mr_asprintf(&(bkpinfo->netfs_proto), "nfs");
    2375             }
    2376             strcpy(tmp1, bkpinfo->netfs_proto);
    2377             if (!popup_and_get_string
    2378                 ("Network protocol", "Which protocol should I use (nfs/sshfs) ?",
    2379                  tmp1, MAX_STR_LEN)) {
    2380                 log_to_screen("User has chosen not to backup the PC");
    2381                 finish(1);
    2382             }
    2383             mr_free(bkpinfo->netfs_proto);
    2384             mr_asprintf(&(bkpinfo->netfs_proto), "%s", tmp1);
    2385             if (!popup_and_get_string
    2386                 ("Network share", "Which remote share should I mount?",
    2387                  bkpinfo->netfs_mount, MAX_STR_LEN)) {
    2388                 log_to_screen("User has chosen not to backup the PC");
    2389                 finish(1);
    2390             }
    2391         }
     2376        }
     2377        strcpy(tmp1, bkpinfo->netfs_proto);
     2378        if (!popup_and_get_string
     2379            ("Network protocol", "Which protocol should I use (nfs/sshfs) ?",
     2380             tmp1, MAX_STR_LEN)) {
     2381            log_to_screen("User has chosen not to backup the PC");
     2382            finish(1);
     2383        }
     2384        mr_free(bkpinfo->netfs_proto);
     2385        mr_asprintf(&(bkpinfo->netfs_proto), "%s", tmp1);
     2386        if (!popup_and_get_string
     2387            ("Network share", "Which remote share should I mount?",
     2388             bkpinfo->netfs_mount, MAX_STR_LEN)) {
     2389            log_to_screen("User has chosen not to backup the PC");
     2390            finish(1);
     2391        }
     2392
    23922393        /* Initiate bkpinfo isodir path from running environment if mount already done */
    23932394        if (is_this_device_mounted(bkpinfo->netfs_mount)) {
Note: See TracChangeset for help on using the changeset viewer.