]> git.sur5r.net Git - bacula/bacula/commitdiff
Use 64 bit ftell and fseek in send_bootstrap_file
authorKern Sibbald <kern@sibbald.com>
Sat, 8 Aug 2009 14:10:27 +0000 (16:10 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 8 Aug 2009 14:10:27 +0000 (16:10 +0200)
bacula/src/dird/restore.c

index 82f798021a09fedfa87534a50d9c41635778a82f..e852edfe4c5b1436ce82c5b9c5d52c3897010aa3 100644 (file)
@@ -231,7 +231,7 @@ static bool check_for_new_storage(JCR *jcr, struct bootstrap_info &info)
 static bool send_bootstrap_file(JCR *jcr, BSOCK *sock,
                                 struct bootstrap_info &info)
 {
-   uint64_t pos;
+   boffset_t pos;
    const char *bootstrap = "bootstrap\n";
    UAContext *ua = info.ua;
    FILE *bs = info.bs;
@@ -241,17 +241,17 @@ static bool send_bootstrap_file(JCR *jcr, BSOCK *sock,
       return false;
    }
    sock->fsend(bootstrap);
-   pos = ftell(bs);
+   pos = ftello(bs);
    while(fgets(ua->cmd, UA_CMD_SIZE, bs)) {
       if (check_for_new_storage(jcr, info)) {
          /* Otherwise, we need to contact another storage daemon.
           * Reset bs to the beginning of the current segment. 
           */
-         fseek(bs, pos, SEEK_SET);
+         fseeko(bs, pos, SEEK_SET);
          break;
       }
       sock->fsend("%s", ua->cmd);
-      pos = ftell(bs);
+      pos = ftello(bs);
    }
    sock->signal(BNET_EOD);
    return true;