fixing leak
[oweals/gnunet.git] / src / include / gnunet_transport_plugin.h
index 31138e8f5711e926420adc0b487021f4d03084f8..507d95abef96abbb6ef0a285c2194a1710b6042f 100644 (file)
@@ -19,7 +19,7 @@
 */
 
 /**
- * @file transport/gnunet_transport_plugin.h
+ * @file include/gnunet_transport_plugin.h
  * @brief API for the transport services.  This header
  *        specifies the struct that is given to the plugin's entry
  *        method and the other struct that must be returned.
@@ -111,7 +111,8 @@ typedef struct GNUNET_TIME_Relative (*GNUNET_TRANSPORT_PluginReceiveCallback) (v
                                                                               const struct
                                                                               GNUNET_MessageHeader *
                                                                               message,
-                                                                              uint32_t distance,
+                                                                              const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                                                                              uint32_t ats_count,
                                                                               struct Session *session,
                                                                               const char *sender_address,
                                                                               uint16_t sender_address_len);
@@ -170,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
@@ -250,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?