[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r35803 - in gnunet/src: exit vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r35803 - in gnunet/src: exit vpn |
Date: |
Mon, 25 May 2015 15:17:43 +0200 |
Author: grothoff
Date: 2015-05-25 15:17:43 +0200 (Mon, 25 May 2015)
New Revision: 35803
Modified:
gnunet/src/exit/gnunet-daemon-exit.c
gnunet/src/vpn/gnunet-service-vpn.c
Log:
-fix channel initialization with regex involvment
Modified: gnunet/src/exit/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/exit/gnunet-daemon-exit.c 2015-05-25 13:12:47 UTC (rev
35802)
+++ gnunet/src/exit/gnunet-daemon-exit.c 2015-05-25 13:17:43 UTC (rev
35803)
@@ -1936,7 +1936,8 @@
* #GNUNET_SYSERR to close it (signal serious error)
*/
static int
-receive_tcp_remote (void *cls GNUNET_UNUSED, struct GNUNET_CADET_Channel
*channel,
+receive_tcp_remote (void *cls GNUNET_UNUSED,
+ struct GNUNET_CADET_Channel *channel,
void **channel_ctx GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message)
{
Modified: gnunet/src/vpn/gnunet-service-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-service-vpn.c 2015-05-25 13:12:47 UTC (rev 35802)
+++ gnunet/src/vpn/gnunet-service-vpn.c 2015-05-25 13:17:43 UTC (rev 35803)
@@ -266,6 +266,12 @@
int af;
/**
+ * Is this channel new (#GNUNET_NO), or did we exchange messages with the
+ * other side already (#GNUNET_YES)?
+ */
+ int is_established;
+
+ /**
* Length of the doubly linked 'tmq_head/tmq_tail' list.
*/
unsigned int tmq_length;
@@ -924,7 +930,6 @@
struct ChannelMessageQueueEntry *tnq;
size_t alen;
size_t mlen;
- int is_new;
const struct GNUNET_TUN_UdpHeader *udp;
const struct GNUNET_TUN_TcpHeader *tcp;
const struct GNUNET_TUN_IcmpHeader *icmp;
@@ -1093,7 +1098,6 @@
{
/* need to either use the existing channel from the destination (if still
available) or create a fresh one */
- is_new = GNUNET_YES;
if (NULL == dt->ts)
ts = create_channel_to_destination (dt, af);
else
@@ -1133,7 +1137,6 @@
}
else
{
- is_new = GNUNET_NO;
GNUNET_CONTAINER_heap_update_cost (channel_heap,
ts->heap_node,
GNUNET_TIME_absolute_get
().abs_value_us);
@@ -1227,7 +1230,7 @@
}
break;
case IPPROTO_TCP:
- if (is_new)
+ if (GNUNET_NO == ts->is_established)
{
if (destination->is_service)
{
@@ -1559,6 +1562,7 @@
GNUNET_assert (0);
break;
}
+ ts->is_established = GNUNET_YES;
send_to_channel (tnq, ts);
}
@@ -3123,16 +3127,18 @@
cadet_handle =
GNUNET_CADET_connect (cfg_, NULL,
- NULL,
- &channel_cleaner,
- cadet_handlers,
- NULL);
+ NULL,
+ &channel_cleaner,
+ cadet_handlers,
+ NULL);
helper_handle = GNUNET_HELPER_start (GNUNET_NO,
"gnunet-helper-vpn", vpn_argv,
&message_token, NULL, NULL);
nc = GNUNET_SERVER_notification_context_create (server, 1);
GNUNET_SERVER_add_handlers (server, service_handlers);
- GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleanup, cls);
+ GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL,
+ &cleanup,
+ NULL);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r35803 - in gnunet/src: exit vpn,
gnunet <=