diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-12-23 17:40:34 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-12-23 17:40:34 +0000 |
commit | 0bbed9dcf7dbdb3cb225e370b9eb3e792c2e0c82 (patch) | |
tree | 99e39a321f12d291ca8f2028e4eb47fc02234123 /src/transport/plugin_transport_http_client.c | |
parent | 8cc3901c0837e2e5b1994e2037153ff933f90fe2 (diff) | |
download | gnunet-0bbed9dcf7dbdb3cb225e370b9eb3e792c2e0c82.tar.gz gnunet-0bbed9dcf7dbdb3cb225e370b9eb3e792c2e0c82.zip |
-add assertions on non-existing sessions
Diffstat (limited to 'src/transport/plugin_transport_http_client.c')
-rw-r--r-- | src/transport/plugin_transport_http_client.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c index cabc6811b..ba7fd45a3 100644 --- a/src/transport/plugin_transport_http_client.c +++ b/src/transport/plugin_transport_http_client.c | |||
@@ -477,8 +477,7 @@ http_client_plugin_send (void *cls, | |||
477 | /* lookup if session is really existing */ | 477 | /* lookup if session is really existing */ |
478 | if (GNUNET_YES != client_exist_session (plugin, s)) | 478 | if (GNUNET_YES != client_exist_session (plugin, s)) |
479 | { | 479 | { |
480 | GNUNET_log_from (GNUNET_ERROR_TYPE_WARNING, plugin->name, | 480 | GNUNET_break (0); |
481 | "Trying to send with invalid session %p \n", s); | ||
482 | return GNUNET_SYSERR; | 481 | return GNUNET_SYSERR; |
483 | } | 482 | } |
484 | 483 | ||
@@ -1758,6 +1757,7 @@ http_plugin_address_to_string (void *cls, | |||
1758 | return http_common_plugin_address_to_string (cls, PLUGIN_NAME, addr, addrlen); | 1757 | return http_common_plugin_address_to_string (cls, PLUGIN_NAME, addr, addrlen); |
1759 | } | 1758 | } |
1760 | 1759 | ||
1760 | |||
1761 | static void | 1761 | static void |
1762 | http_client_plugin_update_session_timeout (void *cls, | 1762 | http_client_plugin_update_session_timeout (void *cls, |
1763 | const struct GNUNET_PeerIdentity *peer, | 1763 | const struct GNUNET_PeerIdentity *peer, |
@@ -1767,8 +1767,10 @@ http_client_plugin_update_session_timeout (void *cls, | |||
1767 | 1767 | ||
1768 | /* lookup if session is really existing */ | 1768 | /* lookup if session is really existing */ |
1769 | if (GNUNET_YES != client_exist_session (plugin, session)) | 1769 | if (GNUNET_YES != client_exist_session (plugin, session)) |
1770 | { | ||
1771 | GNUNET_break (0); | ||
1770 | return; | 1772 | return; |
1771 | 1773 | } | |
1772 | client_reschedule_session_timeout (session); | 1774 | client_reschedule_session_timeout (session); |
1773 | } | 1775 | } |
1774 | 1776 | ||