mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-04-13 13:15:43 +02:00
Change name of the buffersize so that they can't conflict.
This commit is contained in:
parent
e2b049c935
commit
5168e3ee70
@ -56,7 +56,9 @@
|
||||
/**
|
||||
* Maximum size of a buffer for transfer
|
||||
*/
|
||||
#define MAX_XFER_BUF_SIZE 16348
|
||||
#ifndef MAX_XFER_BUF_SIZE
|
||||
#define MAX_XFER_BUF_SIZE (16 * 1024)
|
||||
#endif
|
||||
|
||||
#define CSYNC_STATUS_INIT 1 << 0
|
||||
#define CSYNC_STATUS_UPDATE 1 << 1
|
||||
|
@ -51,7 +51,7 @@ int c_copy(const char* src, const char *dst, mode_t mode) {
|
||||
int rc = -1;
|
||||
ssize_t bread, bwritten;
|
||||
struct stat sb;
|
||||
char buf[MAX_XFER_BUF_SIZE];
|
||||
char buf[BUFFER_SIZE];
|
||||
|
||||
if (c_streq(src, dst)) {
|
||||
return -1;
|
||||
@ -88,7 +88,7 @@ int c_copy(const char* src, const char *dst, mode_t mode) {
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
bread = read(srcfd, buf, MAX_XFER_BUF_SIZE);
|
||||
bread = read(srcfd, buf, BUFFER_SIZE);
|
||||
if (bread == 0) {
|
||||
/* done */
|
||||
break;
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef MAX_XFER_BUF_SIZE
|
||||
#define MAX_XFER_BUF_SIZE 16348
|
||||
#ifndef BUFFER_SIZE
|
||||
#define BUFFER_SIZE (16 * 1024)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user