[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r19203 - gnunet/src/vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r19203 - gnunet/src/vpn |
Date: |
Tue, 17 Jan 2012 17:07:16 +0100 |
Author: grothoff
Date: 2012-01-17 17:07:16 +0100 (Tue, 17 Jan 2012)
New Revision: 19203
Modified:
gnunet/src/vpn/gnunet-service-vpn.c
Log:
-extra checks
Modified: gnunet/src/vpn/gnunet-service-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-service-vpn.c 2012-01-17 16:06:56 UTC (rev 19202)
+++ gnunet/src/vpn/gnunet-service-vpn.c 2012-01-17 16:07:16 UTC (rev 19203)
@@ -648,6 +648,7 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Queueing %u bytes for transmission via mesh tunnel\n",
tnq->len);
+ GNUNET_assert (NULL != ts->tunnel);
GNUNET_CONTAINER_DLL_insert_tail (ts->tmq_head,
ts->tmq_tail,
tnq);
@@ -717,6 +718,15 @@
&tunnel_peer_connect_handler,
&tunnel_peer_disconnect_handler,
ts);
+ if (NULL == ts->tunnel)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Failed to setup mesh tunnel!\n"));
+ if (NULL != client)
+ GNUNET_SERVER_client_drop (client);
+ GNUNET_free (ts);
+ return NULL;
+ }
if (de->is_service)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -988,6 +998,8 @@
ts = create_tunnel_to_destination (destination, NULL, 0);
else
ts = destination->ts;
+ if (NULL == ts)
+ return;
destination->ts = NULL;
ts->destination_container = NULL; /* no longer 'contained' */
/* now bind existing "unbound" tunnel to our IP/port tuple */
@@ -1026,6 +1038,7 @@
ts->heap_node,
GNUNET_TIME_absolute_get ().abs_value);
}
+ GNUNET_assert (NULL != ts->tunnel);
/* send via tunnel */
switch (protocol)
@@ -2001,7 +2014,6 @@
(void) create_tunnel_to_destination (de,
(GNUNET_NO == ntohl (msg->nac)) ? NULL :
client,
msg->request_id);
- GNUNET_assert (NULL != de->ts);
/* we're done */
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r19203 - gnunet/src/vpn,
gnunet <=