projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replacement for stdbool.h
[tinc]
/
src
/
net_packet.c
diff --git
a/src/net_packet.c
b/src/net_packet.c
index
e858daa
..
ff57753
100644
(file)
--- a/
src/net_packet.c
+++ b/
src/net_packet.c
@@
-17,7
+17,7
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: net_packet.c,v 1.1.2.3
4 2003/07/17 15:06:26
guus Exp $
+ $Id: net_packet.c,v 1.1.2.3
6 2003/07/24 12:08:15
guus Exp $
*/
#include "system.h"
*/
#include "system.h"
@@
-239,7
+239,7
@@
static void send_udppacket(node_t *n, vpn_packet_t *inpkt)
if(!n->status.waitingforkey)
send_req_key(n->nexthop->connection, myself, n);
if(!n->status.waitingforkey)
send_req_key(n->nexthop->connection, myself, n);
- n->status.waitingforkey =
1
;
+ n->status.waitingforkey =
true
;
return;
}
return;
}
@@
-323,7
+323,7
@@
static void send_udppacket(node_t *n, vpn_packet_t *inpkt)
/*
send a packet to the given vpn ip.
*/
/*
send a packet to the given vpn ip.
*/
-void send_packet(node_t *n, vpn_packet_t *packet)
+void send_packet(
const
node_t *n, vpn_packet_t *packet)
{
node_t *via;
{
node_t *via;
@@
-350,15
+350,15
@@
void send_packet(node_t *n, vpn_packet_t *packet)
n->name, via->name, n->via->hostname);
if((myself->options | via->options) & OPTION_TCPONLY) {
n->name, via->name, n->via->hostname);
if((myself->options | via->options) & OPTION_TCPONLY) {
- if(send_tcppacket(via->connection, packet))
- terminate_connection(via->connection,
1
);
+ if(
!
send_tcppacket(via->connection, packet))
+ terminate_connection(via->connection,
true
);
} else
send_udppacket(via, packet);
}
/* Broadcast a packet using the minimum spanning tree */
} else
send_udppacket(via, packet);
}
/* Broadcast a packet using the minimum spanning tree */
-void broadcast_packet(node_t *from, vpn_packet_t *packet)
+void broadcast_packet(
const
node_t *from, vpn_packet_t *packet)
{
avl_node_t *node;
connection_t *c;
{
avl_node_t *node;
connection_t *c;