summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_unix.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_unix.c
parent2e33b6fcbad3c1b8ebf7176c39a201c39b23c2b2 (diff)
implementing plugin session monitoring API (#3452)
Diffstat (limited to 'src/transport/plugin_transport_unix.c')
-rw-r--r--src/transport/plugin_transport_unix.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 8a0aa72a0..a753db5ca 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -490,7 +490,7 @@ unix_plugin_session_disconnect (void *cls,
}
notify_session_monitor (plugin,
session,
- GNUNET_TRANSPORT_SS_DOWN);
+ GNUNET_TRANSPORT_SS_DONE);
GNUNET_HELLO_address_free (session->address);
GNUNET_break (0 == session->bytes_in_queue);
GNUNET_break (0 == session->msgs_in_queue);
@@ -520,7 +520,7 @@ session_timeout (void *cls,
the monitor, it may think we're about to die ... */
notify_session_monitor (session->plugin,
session,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_UPDATE);
session->timeout_task = GNUNET_SCHEDULER_add_delayed (left,
&session_timeout,
session);
@@ -898,6 +898,9 @@ unix_plugin_get_session (void *cls,
GNUNET_NO);
notify_session_monitor (plugin,
session,
+ GNUNET_TRANSPORT_SS_INIT);
+ notify_session_monitor (plugin,
+ session,
GNUNET_TRANSPORT_SS_UP);
return session;
}
@@ -973,9 +976,6 @@ unix_demultiplexer (struct Plugin *plugin,
session->address,
session,
&plugin->ats_network, 1);
- notify_session_monitor (plugin,
- session,
- GNUNET_TRANSPORT_SS_UP);
}
else
{
@@ -1141,7 +1141,7 @@ unix_plugin_do_write (struct Plugin *plugin)
if (GNUNET_YES == did_delete)
notify_session_monitor (plugin,
session,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_UPDATE);
return; /* Nothing to send at the moment */
}
@@ -1163,7 +1163,7 @@ unix_plugin_do_write (struct Plugin *plugin)
1, GNUNET_NO);
notify_session_monitor (plugin,
session,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_UPDATE);
return;
}
GNUNET_CONTAINER_DLL_remove (plugin->msg_head,
@@ -1180,7 +1180,7 @@ unix_plugin_do_write (struct Plugin *plugin)
plugin->bytes_in_queue, GNUNET_NO);
notify_session_monitor (plugin,
session,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_UPDATE);
if (GNUNET_SYSERR == sent)
{
/* failed and no retry */
@@ -1358,7 +1358,7 @@ unix_plugin_send (void *cls,
GNUNET_NO);
notify_session_monitor (plugin,
session,
- GNUNET_TRANSPORT_SS_UP);
+ GNUNET_TRANSPORT_SS_UPDATE);
if (GNUNET_SCHEDULER_NO_TASK == plugin->write_task)
plugin->write_task =
GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_FOREVER_REL,
@@ -1703,6 +1703,9 @@ send_session_info_iter (void *cls,
notify_session_monitor (plugin,
session,
+ GNUNET_TRANSPORT_SS_INIT);
+ notify_session_monitor (plugin,
+ session,
GNUNET_TRANSPORT_SS_UP);
return GNUNET_OK;
}