gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r12221 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r12221 - gnunet/src/transport
Date: Tue, 13 Jul 2010 10:31:53 +0200

Author: wachs
Date: 2010-07-13 10:31:53 +0200 (Tue, 13 Jul 2010)
New Revision: 12221

Modified:
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/test_plugin_transport_http.c
Log:


Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2010-07-13 08:04:24 UTC 
(rev 12220)
+++ gnunet/src/transport/plugin_transport_http.c        2010-07-13 08:31:53 UTC 
(rev 12221)
@@ -1722,7 +1722,8 @@
 
   while (ps!=NULL)
   {
-
+       /* Telling transport that session is getting disconnected */
+       plugin->env->session_end(plugin, target, ps);
     if (ps->direction==OUTBOUND)
     {
       if (ps->send_endpoint!=NULL)
@@ -2152,7 +2153,11 @@
   unsigned int timeout = (gn_timeout.value) / 1000;
   if ((plugin->http_server_daemon_v4 == NULL) && 
(plugin->http_server_daemon_v6 == NULL) && (port != 0))
     {
-    plugin->http_server_daemon_v6 = MHD_start_daemon (MHD_USE_IPv6 | 
MHD_USE_DEBUG,
+    plugin->http_server_daemon_v6 = MHD_start_daemon (
+#if DEBUG_HTTP
+                                                                  
MHD_USE_DEBUG |
+#endif
+                                                                  MHD_USE_IPv6,
                                        port,
                                        &mhd_accept_cb,
                                        plugin , &mdh_access_cb, plugin,
@@ -2162,7 +2167,11 @@
                                        MHD_OPTION_CONNECTION_MEMORY_LIMIT, 
(size_t) (16 * 1024),
                                        MHD_OPTION_NOTIFY_COMPLETED, 
&mhd_termination_cb, NULL,
                                        MHD_OPTION_END);
-    plugin->http_server_daemon_v4 = MHD_start_daemon (MHD_NO_FLAG | 
MHD_USE_DEBUG,
+    plugin->http_server_daemon_v4 = MHD_start_daemon (
+#if DEBUG_HTTP
+                                                                  
MHD_USE_DEBUG |
+#endif
+                                                                  MHD_NO_FLAG,
                                        port,
                                        &mhd_accept_cb,
                                        plugin , &mdh_access_cb, plugin,

Modified: gnunet/src/transport/test_plugin_transport_http.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_http.c   2010-07-13 08:04:24 UTC 
(rev 12220)
+++ gnunet/src/transport/test_plugin_transport_http.c   2010-07-13 08:31:53 UTC 
(rev 12221)
@@ -881,6 +881,15 @@
   fail_notify_address = GNUNET_NO;
 }
 
+static void
+plugin_env_session_end  (void *cls,
+                        const struct GNUNET_PeerIdentity *peer,
+                        struct Session *session)
+{
+         GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Session ended: `%s' %X\n", 
GNUNET_i2s(peer), session);
+}
+
+
 /**
  * Setup plugin environment
  */
@@ -895,6 +904,7 @@
   env.receive = &receive;
   env.notify_address = &notify_address;
   env.max_connections = max_connect_per_transport;
+  env.session_end = &plugin_env_session_end;
 }
 
 
@@ -1071,8 +1081,8 @@
 
     GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("\nPhase 3: send multiple or big 
messages after disconnect\n\n"));
     /* disconnect from peer, so new connections are created */
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Disconnect from peer: `%s'\n", 
GNUNET_i2s(&my_identity));
-    api->disconnect(api->cls, &my_identity);
+    //GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Disconnect from peer: `%s'\n", 
GNUNET_i2s(&my_identity));
+    //api->disconnect(api->cls, &my_identity);
 
     /* send a multiple GNUNET_messages at a time*/
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]