projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo.
[tinc]
/
src
/
protocol.c
diff --git
a/src/protocol.c
b/src/protocol.c
index
b5305e8
..
3b81d7a
100644
(file)
--- a/
src/protocol.c
+++ b/
src/protocol.c
@@
-1,6
+1,6
@@
/*
protocol.c -- handle the meta-protocol
/*
protocol.c -- handle the meta-protocol
- Copyright (C) 1999 Ivo Timmermans <zarq@iname.com>
+ Copyright (C) 1999
,2000
Ivo Timmermans <zarq@iname.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-19,6
+19,8
@@
#include "config.h"
#include "config.h"
+#include <sys/types.h>
+
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
@@
-38,6
+40,8
@@
char buffer[MAXBUFSIZE+1];
int buflen;
char buffer[MAXBUFSIZE+1];
int buflen;
+/* Outgoing request routines */
+
int send_ack(conn_list_t *cl)
{
cp
int send_ack(conn_list_t *cl)
{
cp
@@
-66,9
+70,10
@@
cp
buflen = snprintf(buffer, MAXBUFSIZE, "%d %lx\n", TERMREQ, myself->vpn_ip);
buflen = snprintf(buffer, MAXBUFSIZE, "%d %lx\n", TERMREQ, myself->vpn_ip);
- if(
(write(cl->meta_socket, buffer, buflen)
) < 0)
+ if(
write(cl->meta_socket, buffer, buflen
) < 0)
{
{
- syslog(LOG_ERR, "send failed: %s:%d: %m", __FILE__, __LINE__);
+ if(debug_lvl > 1)
+ syslog(LOG_ERR, "send failed: %s:%d: %m", __FILE__, __LINE__);
return -1;
}
cp
return -1;
}
cp
@@
-178,7
+183,7
@@
cp
return 0;
}
return 0;
}
-void send_key_changed
2
(void)
+void send_key_changed
_all
(void)
{
conn_list_t *p;
cp
{
conn_list_t *p;
cp
@@
-396,7
+401,8
@@
cp
int passphrase_h(conn_list_t *cl)
{
cp
int passphrase_h(conn_list_t *cl)
{
cp
- cl->pp=xmalloc(sizeof(*(cl->pp)));
+ cl->pp = xmalloc(sizeof(*(cl->pp)));
+
if(sscanf(cl->buffer, "%*d %as", &(cl->pp->phrase)) != 1)
{
syslog(LOG_ERR, "got bad PASSPHRASE request: %s", cl->buffer);
if(sscanf(cl->buffer, "%*d %as", &(cl->pp->phrase)) != 1)
{
syslog(LOG_ERR, "got bad PASSPHRASE request: %s", cl->buffer);