Displaying 20 results from an estimated 50 matches for "read_int".
Did you mean:
read_ini
2003 Apr 27
1
Rsync read_int questions
...re memory buffers (code 22)
at util.c(238)
rsync: connection unexpectedly closed (28 bytes read so
far)
Looking at the code for recv_exclude_list, it seems real
simple. However, I do see a couple of issues. Using 2.5.6
source code, line 314 of exclude.c has an unsigned int, but
its value is set by read_int - which is signed. Next, I
follow
read_int->readfd->read_unbuffered->read_timeout->read.
Nowhere in this chain do a see a ntoh conversion. I traced
through write_int and I don't see any hton conversions in
the call chain either. How do you ensure an int is in the
proper byte order a...
2002 Mar 06
0
rsync hangs in read_int (generator.c line 498)
...%d\n",phase);
492
493 write_int(f,-1);
494
495 if (remote_version >= 13) {
(gdb) n
generate_files phase=1
493 write_int(f,-1);
(gdb) n
495 if (remote_version >= 13) {
(gdb) print remote_version
$1 = 26
(gdb) n
498 for (i=read_int(f_recv); i != -1; i=read_int(f_recv)) {
(gdb) n
rsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(229)
rsync error: received SIGUSR1 or SIGINT (code 20) at rsync.c(229)
Program exited with code 024.
(gdb)
So it hangs in read_int ... probably because the server doesn't send
anythin...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...ar 29 12:16:23 2003
@@ -230,7 +230,8 @@
OFF_T total_size)
{
int i;
- unsigned int n,remainder,len,count;
+ struct sum_struct sum;
+ unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
char *data;
@@ -238,9 +239,7 @@
static char file_sum2[MD4_SUM_LENGTH];
char *map=NULL;
- count = read_int(f_in);
- n = read_int(f_in);
- remainder = read_int(f_in);
+ read_sum_head(f_in, &sum);
sum_init();
@@ -270,10 +269,10 @@
}
i = -(i+1);
- offset2 = i*(OFF_T)n;
- len = n;
- if (i == (int) count-1 && remainder != 0)
- len = remainder;
+ offset2 = i*(OFF_T)sum.bleng...
2003 Mar 23
1
[RFC] dynamic checksum size
...ar 22 09:47:43 2003
@@ -207,7 +207,8 @@
OFF_T total_size)
{
int i;
- unsigned int n,remainder,len,count;
+ struct sum_struct sum;
+ unsigned int len;
OFF_T offset = 0;
OFF_T offset2;
char *data;
@@ -215,9 +216,7 @@
static char file_sum2[MD4_SUM_LENGTH];
char *map=NULL;
- count = read_int(f_in);
- n = read_int(f_in);
- remainder = read_int(f_in);
+ read_sum_head(f_in, &sum);
sum_init();
@@ -247,10 +246,10 @@
}
i = -(i+1);
- offset2 = i*(OFF_T)n;
- len = n;
- if (i == (int) count-1 && remainder != 0)
- len = remainder;
+ offset2 = i*(OFF_T)sum.bleng...
2003 Mar 22
2
[RFC] protocol version
I'm in the midst of coding a patch set for consideration
that will bump the protocol version and have a couple of
observations.
The current minimum backwards-compatible protocol is 15
but we have code that checks for protocol versions as old as
12. If someone else doesn't beat me to it i'm considering
cleaning out the pre-15 compatibility code. A backwards
compatibility patch could
2004 Jul 12
2
[PATCH] Batch-mode rewrite
..._batch;
+ extern int batch_fd;
extern int checksum_seed;
***************
*** 73,83 ****
--- 76,138 ----
exit_cleanup(RERR_PROTOCOL);
}
+ /* CAS: I think this is a good candidate for a protocol
+ * change. Instead of:
+ *
+ * if (am_server) write_int() stuff;
+ * else read_int() stuff;
+ *
+ * it is good to remove the protocol dependence on server-ness:
+ *
+ * if (am_sender) write_int() stuff;
+ * else read_int() stuff;
+ *
+ * This has the effect of halving the number of possible
+ * protocol combinations, because sender and receiver already
+ *...
2001 Sep 05
2
Feedback on 2.4.7pre1
FYI,
We've been using the 2.4.7pre1 release for several days now, with nary a
hang problem. We haven't seen the EOF bug at all, which was what we
upgraded for. This is with transfers of as much as 50GB to set up an
initial mirror.
The only thing we did was set timeout=0 -- which I guess is unnecessary.
The semantics of this flag are a bit unclear. We thought was 'time since
2001 Dec 18
3
rsync hang, more details [LONG]
...t;", len=66)
at io.c:406
#3 0x24eac in mplex_write (fd=1, code=62, buf=0x591d8 "\a\020", len=62)
at io.c:498
#4 0x24f24 in io_flush () at io.c:518
#5 0x24940 in readfd (fd=0, buffer=0xffbe7020 "?\002r\215?/\201R", N=4)
at io.c:314
#6 0x24998 in read_int (f=0) at io.c:329
#7 0x199a4 in send_files (flist=0x574e8, f_out=1, f_in=0) at sender.c:110
#8 0x1d1e8 in do_server_sender (f_in=0, f_out=1, argc=1, argv=0x56f74)
at main.c:300
#9 0x1d708 in start_server (f_in=0, f_out=1, argc=2, argv=0x56f70)
at main.c:476
#10 0x1e08c in mai...
2003 Oct 05
2
Possible security hole
Maybe security related mails should be sent elsewhere? I didn't notice
any so here it goes:
sender.c:receive_sums()
s->count = read_int(f);
..
s->sums = (struct sum_buf *)malloc(sizeof(s->sums[0])*s->count);
if (!s->sums) out_of_memory("receive_sums");
for (i=0; i < (int) s->count;i++) {
s->sums[i].sum1 = read_int(f);
read_buf(f,s->sums[i].sum2,csum_length);
..
If I read this right, given...
2017 Apr 14
4
rsync buffer overflow detected
...0x0000555555584c78 in safe_read (fd=fd at entry=1606,
buf=buf at entry=0x7fffffffa810 "\037", len=len at entry=4) at io.c:245
#7 0x0000555555585cfe in read_buf (f=f at entry=1606,
buf=buf at entry=0x7fffffffa810 "\037", len=len at entry=4) at io.c:1815
#8 0x0000555555585ef6 in read_int (f=f at entry=1606) at io.c:1711
#9 0x00005555555876ed in setup_protocol (f_out=1605, f_in=1606) at compat.c:158
#10 0x0000555555576417 in client_run (f_in=1606, f_out=1605,
pid=24793, argc=1, argv=0x5555557d5240) at main.c:1128
#11 0x000055555557795e in start_client (argv=0x5555557d5240, argc=1)...
2015 Dec 26
0
About data/token send/receive protocol part and more
...-------------------
diff -rupN ../rsync.git/token.c ./token.c
--- ../rsync.git/token.c 2015-11-03 18:21:36.264183118 +0100
+++ ./token.c 2015-12-26 03:43:09.043841052 +0100
@@ -226,8 +226,12 @@ static int32 simple_recv_token(int f, ch
if (residue == 0) {
int32 i = read_int(f);
- if (i <= 0)
+ if (i <= 0) {
+ if (protocol_version >= 32) {
+ int32 j = read_int(f); /* additional metadata */
+ }
return i;
+ }...
2003 May 20
0
patch for better handling of write failures (disk full)
...ml
diff -Nru a/rsync/receiver.c b/rsync/receiver.c
--- a/rsync/receiver.c Tue May 20 08:56:43 2003
+++ b/rsync/receiver.c Tue May 20 08:56:43 2003
@@ -214,6 +214,7 @@
static char file_sum1[MD4_SUM_LENGTH];
static char file_sum2[MD4_SUM_LENGTH];
char *map=NULL;
+ int discard = 0;
count = read_int(f_in);
n = read_int(f_in);
@@ -240,7 +241,9 @@
if (fd != -1 && write_file(fd,data,i) != i) {
rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno));
- exit_cleanup(RERR_FILEIO);
+ discard = 1;
+ fd = -1;
+ // exit_cleanup(RERR_FILEIO);
}...
2003 Jan 03
1
[Fwd: Re: rsync windows -> unix still hanging :(]
...rprintf(FINFO,"file list sent\n");
+ io_flush();
+ io_start_buffering_out(f_out);
send_files(flist,f_out,f_in);
+ io_flush();
if (remote_version >= 24) {
/* final goodbye message */
read_int(f_in);
***************
*** 590,595 ****
--- 597,603 ----
wait_process(pid, &status);
}
report(-1);
+ io_flush();
exit_cleanup(status);
}
Mike Rubel wrote:
>[ ... ]
>
>
>
>Could you clarify for me whether the patch Steve ref...
2002 Jan 13
0
rsynd-2.5.1 / io.c patches
...readfd (int fd, char *buffer, int N)
+static void readfd (int fd, void *buffer1, int N)
{
int ret;
int total=0;
+ unsigned char * buffer;
+ buffer = (unsigned char *)buffer1;
while (total < N) {
io_flush();
@@ -323,7 +330,7 @@
int32 read_int(int f)
{
- char b[4];
+ unsigned char b[4];
int32 ret;
readfd(f,b,4);
@@ -336,7 +343,7 @@
{
extern int remote_version;
int64 ret;
- char b[8];
+ unsigned char b[8];
ret = read_int(f);
if ((int32)ret != (int32)0xffff...
2001 Aug 06
1
merge rsync+ into rsync (was Re: rsync-2.4.7 NEWS file)
> Just curious: what about the rsync+ patch?
Thanks for the reminder.
I've just committed Jos's rsync+ patch onto the
"branch_mbp_rsyncplus_merge" branch. If it works OK and nobody
screams I will move it across onto the main tree tomorrow or
Wednesday.
I see the patch doesn't add documentation about the new options to the
man page, so we should fix that in the future.
2003 May 23
1
PATCH: better handling for write failures (disk full)
...n
diff -Nru a/rsync/receiver.c b/rsync/receiver.c
--- a/rsync/receiver.c Tue May 20 08:56:43 2003
+++ b/rsync/receiver.c Tue May 20 08:56:43 2003
@@ -214,6 +214,7 @@
static char file_sum1[MD4_SUM_LENGTH];
static char file_sum2[MD4_SUM_LENGTH];
char *map=NULL;
+ int discard = 0;
count = read_int(f_in);
n = read_int(f_in);
@@ -240,7 +241,9 @@
if (fd != -1 && write_file(fd,data,i) != i) {
rprintf(FERROR,"write failed on %s : %s\n",fname,strerror(errno));
- exit_cleanup(RERR_FILEIO);
+ discard = 1;
+ fd = -1;
+ // exit_cleanup(RERR_FILEIO);
}...
2006 Sep 20
3
Unit and Functional Tests Bombing with Ferret
Hello,
I am currently using ferret 0.9.5 and acts_as_ferret 0.2.3 on windows XP
All my unit and functions test that used to work before I installed
ferret are erroring out. My index is on a model name Post, and it looks
like all tests that contains methods which does CRUD to the Post model
bombs out.
Is there anything special I need to do before running unit and
functional test?
Thanks
2004 Apr 08
4
Device majors incorrectly set to 0 during rsync
OK. Didn't see anything about this in the archives, other than an old post
from 2000 about a similar problem, so here goes. Feel free to contact me if
I can provide anything else useful.
Problem:
--------
Major numbers on 64bit Solaris are being dropped, and created as 0 on
recieving end. 32bit version works perfectly.
Environment:
------------
Solaris 8 or Solaris 9 (haven't tried
2004 Apr 10
0
patches for copying atimes
...t file_struct *file;
if (!fptr) {
- modtime = 0, mode = 0;
+ modtime = 0, atime = 0, mode = 0;
rdev = 0, rdev_high = 0, dev = 0;
uid = 0, gid = 0;
*lastname = '\0';
@@ -575,6 +585,11 @@
file_length = read_longint(f);
if (!(flags & XMIT_SAME_TIME))
modtime = (time_t)read_int(f);
+ if (protocol_version > 28) {
+ if (!(flags & XMIT_SAME_ATIME))
+ atime = (time_t)read_int(f);
+ } else
+ atime = time(NULL);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
@@ -624,6 +639,7 @@...
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...file_struct *file;
if (!flist) {
- modtime = 0, mode = 0;
+ modtime = 0, acctime = 0, mode = 0;
dev = 0, rdev = makedev(0, 0);
rdev_major = 0;
uid = 0, gid = 0;
@@ -578,6 +585,10 @@
file_length = read_longint(f);
if (!(flags & XMIT_SAME_TIME))
modtime = (time_t)read_int(f);
+ if (remote_protocol >= 30)
+ acctime = (time_t)read_int(f);
+ else
+ acctime = time(NULL);
if (!(flags & XMIT_SAME_MODE))
mode = from_wire_mode(read_int(f));
@@ -630,6 +641,7 @@
file->flags = 0;
file->modtime = modtime;
+ file->acctime = acctime;
file->leng...