fixing leak
[oweals/gnunet.git] / src / include / gnunet_transport_plugin.h
index 83ecf6fb8bb6f3c1e9f2cc8b1d4b7168aa56d808..507d95abef96abbb6ef0a285c2194a1710b6042f 100644 (file)
@@ -112,7 +112,7 @@ typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_PluginReceiveCallback) (v
                                                                               GNUNET_MessageHeader *
                                                                               message,
                                                                               const struct GNUNET_TRANSPORT_ATS_Information *ats,
-                                                                  uint32_t ats_count,
+                                                                              uint32_t ats_count,
                                                                               struct Session *session,
                                                                               const char *sender_address,
                                                                               uint16_t sender_address_len);
@@ -171,10 +171,10 @@ typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_TrafficReport) (void *cls
  * @param cost pointer to the first element of struct GNUNET_TRANSPORT_ATS_Cost_Information[]
  */
 typedef void (*GNUNET_TRANSPORT_CostReport) (void *cls,
-                                                                                        const struct GNUNET_PeerIdentity *peer,
+                                            const struct GNUNET_PeerIdentity *peer,
                                              const void *addr,
                                              uint16_t addrlen,
-                                                                                        struct GNUNET_TRANSPORT_ATS_Information * cost);
+                                            struct GNUNET_TRANSPORT_ATS_Information * cost);
 
 /**
  * The transport service will pass a pointer to a struct
@@ -251,7 +251,12 @@ struct GNUNET_TRANSPORT_PluginEnvironment
 
 /**
  * Function called by the GNUNET_TRANSPORT_TransmitFunction
- * upon "completion".
+ * upon "completion".  In the case that a peer disconnects,
+ * this function must be called for each pending request
+ * (with a 'failure' indication) AFTER notifying the service
+ * about the disconnect event (so that the service won't try
+ * to transmit more messages, believing the connection still
+ * exists...).
  *
  * @param cls closure
  * @param target who was the recipient of the message?