Check-in [73a43a3c3b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated file_sync tool to use the same blocksize size in the sender as the receiver.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:73a43a3c3b737bfd42f0a3739b61c1f266865cd8
User & Date: rkeene 2008-11-06 20:53:14
Context
2008-11-07
21:32
Added standalone file_sync Updated file_sync to correct warnings issued by GCC4 check-in: 00184e2c99 user: rkeene tags: trunk
2008-11-06
20:53
Updated file_sync tool to use the same blocksize size in the sender as the receiver. check-in: 73a43a3c3b user: rkeene tags: trunk
2008-04-05
20:57
Many changes to BackupPCd client (BackupPC side of things) check-in: aaba012330 user: rkeene tags: trunk
Changes

Changes to tools/file_sync.c.

116
117
118
119
120
121
122


123
124
125
126
127
128
129
130
131
132


133
134
135
136
137
138
139
...
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327

	retval = read_large(fd, buf, count);

	if (retval > 0) {
		net_bytesin += retval;
	}



	return(retval);
}

static ssize_t write_large_net(int fd, void *buf, size_t count) {
	ssize_t retval;

	retval = write_large(fd, buf, count);
	if (retval > 0) {
		net_bytesout += retval;
	}



	return(retval);
}

int sync_transmit(const char *host, int port, const char *file, uint64_t blocksize) {
	rsaref_MD4_CTX mdctx;
	unsigned char md4buf[16];
................................................................................
	return(retval);
}

int sync_receive(int port, const char *file) {
	rsaref_MD4_CTX mdctx;
	unsigned char md4buf[16], check_md4buf[16];
	uint64_t filesize, filesize_s;
	uint32_t blocksize;
	uint32_t blockok_size, blockidx = 0;
	uint8_t *blockok, blockok_val;
	ssize_t cur_read_ret, read_ret, write_ret;
	size_t bytestowrite;
	off_t lseek_ret;
	off_t curpos, destpos;
	char *buf;







>
>










>
>







 







|







116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
...
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331

	retval = read_large(fd, buf, count);

	if (retval > 0) {
		net_bytesin += retval;
	}

	DPRINTF("read_large_net(fd=%i, buf=%p, count=%lu) = %li", fd, buf, (unsigned long) count, (long) retval);

	return(retval);
}

static ssize_t write_large_net(int fd, void *buf, size_t count) {
	ssize_t retval;

	retval = write_large(fd, buf, count);
	if (retval > 0) {
		net_bytesout += retval;
	}

	DPRINTF("write_large_net(fd=%i, buf=%p, count=%lu) = %li", fd, buf, (unsigned long) count, (long) retval);

	return(retval);
}

int sync_transmit(const char *host, int port, const char *file, uint64_t blocksize) {
	rsaref_MD4_CTX mdctx;
	unsigned char md4buf[16];
................................................................................
	return(retval);
}

int sync_receive(int port, const char *file) {
	rsaref_MD4_CTX mdctx;
	unsigned char md4buf[16], check_md4buf[16];
	uint64_t filesize, filesize_s;
	uint64_t blocksize;
	uint32_t blockok_size, blockidx = 0;
	uint8_t *blockok, blockok_val;
	ssize_t cur_read_ret, read_ret, write_ret;
	size_t bytestowrite;
	off_t lseek_ret;
	off_t curpos, destpos;
	char *buf;