-fix NPE
[oweals/gnunet.git] / src / transport / transport_api.c
index dca9b4b7876ed18dda0bc4f9ed279ffeef5b151e..50296855385e5862ecdd730b08ec8e3c0378b7ca 100644 (file)
@@ -1742,16 +1742,16 @@ GNUNET_TRANSPORT_set_traffic_metric (struct GNUNET_TRANSPORT_Handle *handle,
  * @param cont continuation to call when HELLO has been sent,
  *     tc reason #GNUNET_SCHEDULER_REASON_TIMEOUT for fail
  *     tc reasong #GNUNET_SCHEDULER_REASON_READ_READY for success
- * @param cls closure for continuation
+ * @param cont_cls closure for @a cont
  * @return a `struct GNUNET_TRANSPORT_OfferHelloHandle` handle or NULL on failure,
- *      in case of failure cont will not be called
+ *      in case of failure @a cont will not be called
  *
  */
 struct GNUNET_TRANSPORT_OfferHelloHandle *
 GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
                               const struct GNUNET_MessageHeader *hello,
                               GNUNET_SCHEDULER_TaskCallback cont,
-                              void *cls)
+                              void *cont_cls)
 {
   struct GNUNET_TRANSPORT_OfferHelloHandle *ohh;
   struct GNUNET_MessageHeader *msg;
@@ -1780,11 +1780,15 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
   ohh = GNUNET_new (struct GNUNET_TRANSPORT_OfferHelloHandle);
   ohh->th = handle;
   ohh->cont = cont;
-  ohh->cls = cls;
+  ohh->cls = cont_cls;
   ohh->msg = msg;
-  ohh->tth = schedule_control_transmit (handle, size,
-                                        &send_hello, ohh);
-  GNUNET_CONTAINER_DLL_insert (handle->oh_head, handle->oh_tail, ohh);
+  ohh->tth = schedule_control_transmit (handle,
+                                        size,
+                                        &send_hello,
+                                        ohh);
+  GNUNET_CONTAINER_DLL_insert (handle->oh_head,
+                               handle->oh_tail,
+                               ohh);
   return ohh;
 }