summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-11-07 16:33:42 +0000
committerChristian Grothoff <christian@grothoff.org>2014-11-07 16:33:42 +0000
commit0c89b2a16eae49cb23635f6d6c0f13da070c5c66 (patch)
tree559186ca56ac1279a611d31f3bf3816bc971431c /src/transport/plugin_transport_http_server.c
parent2e33b6fcbad3c1b8ebf7176c39a201c39b23c2b2 (diff)
implementing plugin session monitoring API (#3452)
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index c7a1bfe7a..47b0bda7f 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -598,11 +598,13 @@ server_delete_session (struct Session *s)
}
notify_session_monitor (plugin,
s,
- GNUNET_TRANSPORT_SS_DOWN);
+ GNUNET_TRANSPORT_SS_DONE);
if (GNUNET_YES == s->known_to_service)
+ {
plugin->env->session_end (plugin->env->cls,
s->address,
s);
+ }
if (NULL != s->msg_tk)
{
GNUNET_SERVER_mst_destroy (s->msg_tk);
@@ -1461,6 +1463,9 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_MULTIPLE);
notify_session_monitor (plugin,
s,
+ GNUNET_TRANSPORT_SS_INIT);
+ notify_session_monitor (plugin,
+ s,
GNUNET_TRANSPORT_SS_HANDSHAKE);
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Creating new session %p for peer `%s' connecting from `%s'\n",
@@ -1512,7 +1517,13 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
(NULL != s->server_recv) )
{
s->known_to_service = GNUNET_YES;
- plugin->env->session_start (NULL, s->address ,s, NULL, 0);
+ notify_session_monitor (plugin,
+ s,
+ GNUNET_TRANSPORT_SS_UP);
+ plugin->env->session_start (NULL,
+ s->address,
+ s,
+ NULL, 0);
}
if ( (NULL == s->server_recv) ||
@@ -1592,7 +1603,7 @@ server_send_callback (void *cls,
GNUNET_free (msg);
notify_session_monitor (s->plugin,
s,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_UPDATE);
}
}
if (0 < bytes_read)
@@ -3298,7 +3309,7 @@ send_session_info_iter (void *cls,
notify_session_monitor (plugin,
session,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_INIT);
return GNUNET_OK;
}