aboutsummaryrefslogtreecommitdiff
path: root/src/vpn/gnunet-service-vpn.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-05-22 09:20:27 +0000
committerChristian Grothoff <christian@grothoff.org>2015-05-22 09:20:27 +0000
commit044664df721c7c0be86c25c2548338154feedb9b (patch)
tree6804f94f4961d7b52d3fb9498c92089ad21df4e2 /src/vpn/gnunet-service-vpn.c
parent259e8c1c53b241df2717d8d0b740453c2252ef27 (diff)
downloadgnunet-044664df721c7c0be86c25c2548338154feedb9b.tar.gz
gnunet-044664df721c7c0be86c25c2548338154feedb9b.zip
-fix assertion: channel could be NULL (especially if we're dealing with a regex)
Diffstat (limited to 'src/vpn/gnunet-service-vpn.c')
-rw-r--r--src/vpn/gnunet-service-vpn.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index 401e4078b..cd0c9a07e 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -728,10 +728,10 @@ handle_regex_result (void *cls,
728 return; 728 return;
729 } 729 }
730 ts->channel = GNUNET_CADET_channel_create (cadet_handle, 730 ts->channel = GNUNET_CADET_channel_create (cadet_handle,
731 ts, 731 ts,
732 id, 732 id,
733 apptype, 733 apptype,
734 GNUNET_CADET_OPTION_DEFAULT); 734 GNUNET_CADET_OPTION_DEFAULT);
735} 735}
736 736
737 737
@@ -1095,7 +1095,14 @@ route_packet (struct DestinationEntry *destination,
1095 ts->heap_node, 1095 ts->heap_node,
1096 GNUNET_TIME_absolute_get ().abs_value_us); 1096 GNUNET_TIME_absolute_get ().abs_value_us);
1097 } 1097 }
1098 GNUNET_assert (NULL != ts->channel); 1098 if (NULL == ts->channel)
1099 {
1100 GNUNET_STATISTICS_update (stats,
1101 gettext_noop ("# Packets dropped (channel not yet online)"),
1102 1,
1103 GNUNET_NO);
1104 return;
1105 }
1099 1106
1100 /* send via channel */ 1107 /* send via channel */
1101 switch (protocol) 1108 switch (protocol)
@@ -2753,7 +2760,7 @@ service_redirect_to_service (void *cls,
2753 de->dt_tail, 2760 de->dt_tail,
2754 dt); 2761 dt);
2755 ts = create_channel_to_destination (dt, 2762 ts = create_channel_to_destination (dt,
2756 result_af); 2763 result_af);
2757 switch (result_af) 2764 switch (result_af)
2758 { 2765 {
2759 case AF_INET: 2766 case AF_INET: