You should have received a copy of the GNU General Public License
along with GNUnet; see the file COPYING. If not, write to the
- Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
*/
/**
/**
* Abstract representation of a plugin's session.
- * Corresponds to the `struct Session` within the TRANSPORT service.
+ * Corresponds to the `struct GNUNET_ATS_Session` within the TRANSPORT service.
*/
struct GNUNET_TRANSPORT_PluginSession
{
}
-/**
- * We got disconnected, remove all existing entries from
- * the map and notify client.
- *
- * @param pm montitor that got disconnected
- */
-static void
-clear_map (struct GNUNET_TRANSPORT_PluginMonitor *pm)
-{
- GNUNET_CONTAINER_multihashmap32_iterate (pm->sessions,
- &free_entry,
- pm);
-}
-
-
/**
* Cut the existing connection and reconnect.
*
{
GNUNET_CLIENT_disconnect (pm->client);
pm->client = NULL;
- clear_map (pm);
+ GNUNET_CONTAINER_multihashmap32_iterate (pm->sessions,
+ &free_entry,
+ pm);
pm->backoff = GNUNET_TIME_STD_BACKOFF (pm->backoff);
pm->reconnect_task = GNUNET_SCHEDULER_add_delayed (pm->backoff,
&do_plugin_connect,
GNUNET_SCHEDULER_cancel (pm->reconnect_task);
pm->reconnect_task = NULL;
}
- clear_map (pm);
+ GNUNET_CONTAINER_multihashmap32_iterate (pm->sessions,
+ &free_entry,
+ pm);
GNUNET_CONTAINER_multihashmap32_destroy (pm->sessions);
GNUNET_free (pm);
}