chiark
/
gitweb
/
~ian
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test example: Files for a simple testing configuration now in test-example/
[secnet.git]
/
log.c
diff --git
a/log.c
b/log.c
index 837ed55acf8c9530a2e4d9f4e87feec3b433449e..6f4b7380198e7ad37dbf367d36b43b39a704e979 100644
(file)
--- a/
log.c
+++ b/
log.c
@@
-19,12
+19,13
@@
static void vMessage(uint32_t class, const char *message, va_list args)
FILE *dest=stdout;
#define MESSAGE_BUFLEN 1023
static char buff[MESSAGE_BUFLEN+1]={0,};
FILE *dest=stdout;
#define MESSAGE_BUFLEN 1023
static char buff[MESSAGE_BUFLEN+1]={0,};
-
uint32
_t bp;
+
size
_t bp;
char *nlp;
if (secnet_is_daemon) {
/* Messages go to the system log interface */
bp=strlen(buff);
char *nlp;
if (secnet_is_daemon) {
/* Messages go to the system log interface */
bp=strlen(buff);
+ assert(bp < MESSAGE_BUFLEN);
vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args);
/* Each line is sent separately */
while ((nlp=strchr(buff,'\n'))) {
vsnprintf(buff+bp,MESSAGE_BUFLEN-bp,message,args);
/* Each line is sent separately */
while ((nlp=strchr(buff,'\n'))) {
@@
-487,8
+488,7
@@
struct fdlog {
};
static int log_from_fd_beforepoll(void *sst, struct pollfd *fds, int *nfds_io,
};
static int log_from_fd_beforepoll(void *sst, struct pollfd *fds, int *nfds_io,
- int *timeout_io,
- const struct timeval *tv_now, uint64_t *now)
+ int *timeout_io)
{
struct fdlog *st=sst;
if (!st->finished) {
{
struct fdlog *st=sst;
if (!st->finished) {
@@
-499,8
+499,7
@@
static int log_from_fd_beforepoll(void *sst, struct pollfd *fds, int *nfds_io,
return 0;
}
return 0;
}
-static void log_from_fd_afterpoll(void *sst, struct pollfd *fds, int nfds,
- const struct timeval *tv_now, uint64_t *now)
+static void log_from_fd_afterpoll(void *sst, struct pollfd *fds, int nfds)
{
struct fdlog *st=sst;
int r,remain,i;
{
struct fdlog *st=sst;
int r,remain,i;