/**
* What type of client is this?
- */
+ */
enum ClientType type;
union {
-
+
/**
* Peer identity to monitor the addresses of.
* Zero to monitor all neighbours. Valid if
* if we're performing one that has been cancelled).
*/
struct GST_BlacklistCheck *bc;
-
+
/**
* Set to #GNUNET_YES if we're currently waiting for a reply.
*/
int waiting_for_reply;
-
+
/**
* #GNUNET_YES if we have to call receive_done for this client
*/
int call_receive_done;
-
+
} blacklist;
-
+
} details;
-
+
};
*/
struct SendTransmitContinuationContext
{
-
+
/**
* Client that made the request.
*/
GNUNET_CONTAINER_multipeermap_iterate (active_stccs,
&mark_match_down,
tc);
+ for (struct AddressToStringContext *cur = a2s_head;
+ NULL != cur;
+ cur = cur->next)
+ {
+ if (cur->tc == tc)
+ cur->tc = NULL;
+ }
GNUNET_CONTAINER_DLL_remove (clients_head,
clients_tail,
tc);
bc);
}
break;
- }
+ }
GNUNET_free (tc);
}
{
struct TransportClient *tc = cls;
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Received HELLO message\n");
GST_validation_handle_hello (message);
GNUNET_SERVICE_client_continue (tc->client);
}
const struct OutboundMessage *obm)
{
static unsigned long long uuid_gen;
- struct TransportClient *tc = cls;
+ struct TransportClient *tc = cls;
const struct GNUNET_MessageHeader *obmm;
struct SendTransmitContinuationContext *stcc;
GNUNET_assert ( (GNUNET_OK == res) ||
(GNUNET_SYSERR == res) );
+ if (NULL == actx->tc)
+ return;
if (NULL == buf)
{
env = GNUNET_MQ_msg (atsm,
GNUNET_CONTAINER_DLL_remove (a2s_head,
a2s_tail,
actx);
+ GNUNET_free (actx);
return;
}
if (GNUNET_SYSERR == res)
return GNUNET_SYSERR;
}
return GNUNET_OK;
-}
+}
/**
handle_client_address_to_string (void *cls,
const struct AddressLookupMessage *alum)
{
- struct TransportClient *tc = cls;
+ struct TransportClient *tc = cls;
struct GNUNET_TRANSPORT_PluginFunctions *papi;
const char *plugin_name;
const char *address;
const struct GNUNET_MessageHeader *message)
{
struct TransportClient *tc = cls;
-
+
GNUNET_SERVICE_client_mark_monitor (tc->client);
GNUNET_SERVICE_client_disable_continue_warning (tc->client);
GNUNET_notification_context_add (plugin_nc,
goto end;
type = ntohs (message->type);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Received message with type %u from peer `%s'\n",
+ "Received message with type %u from peer `%s' at %s\n",
type,
- GNUNET_i2s (&address->peer));
+ GNUNET_i2s (&address->peer),
+ GST_plugins_a2s (address));
GNUNET_STATISTICS_update (GST_stats,
gettext_noop ("# bytes total received"),
const struct TrafficMetricMessage *tm)
{
struct TransportClient *tc = cls;
-
+
GST_manipulation_set_metric (tm);
GNUNET_SERVICE_client_continue (tc->client);
}
bc = tc->details.blacklist.bc;
tc->details.blacklist.bc = NULL;
tc->details.blacklist.waiting_for_reply = GNUNET_NO;
- tc->details.blacklist.call_receive_done = GNUNET_YES;
+ tc->details.blacklist.call_receive_done = GNUNET_YES;
if (NULL != bc)
{
/* only run this if the blacklist check has not been
GNUNET_assert (NULL != GST_my_private_key);
GNUNET_log(GNUNET_ERROR_TYPE_INFO,
- "My identity is `%4s'\n",
+ "My identity is `%s'\n",
GNUNET_i2s_full (&GST_my_identity));
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
#if HAVE_GETRLIMIT
{
struct rlimit r_file;
-
+
if (0 == getrlimit (RLIMIT_NOFILE,
&r_file))
{
GNUNET_MESSAGE_TYPE_TRANSPORT_SEND,
struct OutboundMessage,
NULL),
- GNUNET_MQ_hd_var_size (client_address_to_string,
+ GNUNET_MQ_hd_var_size (client_address_to_string,
GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_TO_STRING,
struct AddressLookupMessage,
NULL),
GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC,
struct TrafficMetricMessage,
NULL),
- GNUNET_MQ_hd_fixed_size (client_monitor_plugins,
+ GNUNET_MQ_hd_fixed_size (client_monitor_plugins,
GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PLUGIN_START,
struct GNUNET_MessageHeader,
NULL),