[roaming.h roaming_common.c roaming_dummy.c]
     Add  tags for the benefit of the sync scripts
     Also: pull in the changes for 1.1->1.2 missed in the previous sync.
This commit is contained in:
Darren Tucker 2009-06-21 19:08:48 +10:00
parent 6ae35ac576
commit e6b590e8d4
4 changed files with 22 additions and 10 deletions

View File

@ -101,6 +101,10 @@
[kexdhs.c kexgexs.c]
abort if key_sign fails, preventing possible null deref. Based on report
from Paolo Ganci, ok markus@ djm@
- dtucker@cvs.openbsd.org 2009/06/21 09:04:03
[roaming.h roaming_common.c roaming_dummy.c]
Add tags for the benefit of the sync scripts
Also: pull in the changes for 1.1->1.2 missed in the previous sync.
20090616
- (dtucker) [configure.ac defines.h] Bug #1607: handle the case where fsid_t

View File

@ -1,3 +1,4 @@
/* $OpenBSD: roaming.h,v 1.3 2009/06/21 09:04:03 dtucker Exp $ */
/*
* Copyright (c) 2004-2009 AppGate Network Security AB
*
@ -22,7 +23,7 @@ extern int resume_in_progress;
void add_recv_bytes(u_int64_t);
ssize_t roaming_write(int, const void *, size_t, int *);
ssize_t roaming_read(int, void *, size_t, int *);
ssize_t roaming_atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
size_t roaming_atomicio(ssize_t (*)(int, void *, size_t), int, void *, size_t);
u_int64_t get_recv_bytes(void);
u_int64_t get_sent_bytes(void);
void roam_set_bytes(u_int64_t, u_int64_t);

View File

@ -1,3 +1,4 @@
/* $OpenBSD: roaming_common.c,v 1.4 2009/06/21 09:04:03 dtucker Exp $ */
/*
* Copyright (c) 2004-2009 AppGate Network Security AB
*
@ -55,9 +56,9 @@ get_sent_bytes(void)
}
void
roam_set_bytes(u_int64_t sent, u_int64_t recv)
roam_set_bytes(u_int64_t sent, u_int64_t recvd)
{
read_bytes = recv;
read_bytes = recvd;
write_bytes = sent;
}
@ -70,7 +71,8 @@ roaming_write(int fd, const void *buf, size_t count, int *cont)
if (ret > 0 && !resume_in_progress) {
write_bytes += ret;
}
debug("Wrote %d bytes for a total of %lld", ret, write_bytes);
debug3("Wrote %ld bytes for a total of %llu", (long)ret,
(unsigned long long)write_bytes);
return ret;
}
@ -86,12 +88,13 @@ roaming_read(int fd, void *buf, size_t count, int *cont)
return ret;
}
ssize_t
roaming_atomicio(ssize_t(*f)(), int fd, void *buf, size_t count)
size_t
roaming_atomicio(ssize_t(*f)(int, void*, size_t), int fd, void *buf,
size_t count)
{
ssize_t ret = atomicio(f, fd, buf, count);
size_t ret = atomicio(f, fd, buf, count);
if ((f == write || f == vwrite) && ret > 0 && !resume_in_progress) {
if (f == vwrite && ret > 0 && !resume_in_progress) {
write_bytes += ret;
} else if (f == read && ret > 0 && !resume_in_progress) {
read_bytes += ret;

View File

@ -1,3 +1,4 @@
/* $OpenBSD: roaming_dummy.c,v 1.3 2009/06/21 09:04:03 dtucker Exp $ */
/*
* Copyright (c) 2004-2009 AppGate Network Security AB
*
@ -22,9 +23,12 @@
#include <sys/types.h>
#include <unistd.h>
#include "roaming.h"
int resume_in_progress = 0;
u_int64_t get_recv_bytes()
u_int64_t
get_recv_bytes(void)
{
return 0;
}
@ -49,7 +53,7 @@ add_recv_bytes(u_int64_t num)
}
int
resume_kex()
resume_kex(void)
{
return 1;
}