From: Kern Sibbald Date: Sat, 8 Aug 2009 14:10:27 +0000 (+0200) Subject: Use 64 bit ftell and fseek in send_bootstrap_file X-Git-Tag: Release-5.0.0~333^2~59 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=970ab2677a83166069769bf7040a813fa9ea1fe5;p=bacula%2Fbacula Use 64 bit ftell and fseek in send_bootstrap_file --- diff --git a/bacula/src/dird/restore.c b/bacula/src/dird/restore.c index 82f798021a..e852edfe4c 100644 --- a/bacula/src/dird/restore.c +++ b/bacula/src/dird/restore.c @@ -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;