aboutsummaryrefslogtreecommitdiff
path: root/src/transport/transport_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/transport_api.c')
-rw-r--r--src/transport/transport_api.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index 2da1a90d6..2da6e9a54 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -355,7 +355,7 @@ struct GNUNET_TRANSPORT_Handle
355 * The current HELLO message for this peer. Updated 355 * The current HELLO message for this peer. Updated
356 * whenever transports change their addresses. 356 * whenever transports change their addresses.
357 */ 357 */
358 struct GNUNET_HELLO_Message *my_hello; 358 struct GNUNET_MessageHeader *my_hello;
359 359
360 /** 360 /**
361 * My client connection to the transport service. 361 * My client connection to the transport service.
@@ -655,7 +655,8 @@ demultiplexer (void *cls,
655 break; 655 break;
656 } 656 }
657 LOG (GNUNET_ERROR_TYPE_DEBUG, 657 LOG (GNUNET_ERROR_TYPE_DEBUG,
658 "Receiving (my own) `%s' message, I am `%4s'.\n", "HELLO", 658 "Receiving (my own) HELLO message (%u bytes), I am `%4s'.\n",
659 (unsigned int) size,
659 GNUNET_i2s (&me)); 660 GNUNET_i2s (&me));
660 GNUNET_free_non_null (h->my_hello); 661 GNUNET_free_non_null (h->my_hello);
661 h->my_hello = NULL; 662 h->my_hello = NULL;
@@ -664,14 +665,13 @@ demultiplexer (void *cls,
664 GNUNET_break (0); 665 GNUNET_break (0);
665 break; 666 break;
666 } 667 }
667 h->my_hello = GNUNET_malloc (size); 668 h->my_hello = GNUNET_copy_message (msg);
668 memcpy (h->my_hello, msg, size);
669 hwl = h->hwl_head; 669 hwl = h->hwl_head;
670 while (NULL != hwl) 670 while (NULL != hwl)
671 { 671 {
672 next_hwl = hwl->next; 672 next_hwl = hwl->next;
673 hwl->rec (hwl->rec_cls, 673 hwl->rec (hwl->rec_cls,
674 (const struct GNUNET_MessageHeader *) h->my_hello); 674 h->my_hello);
675 hwl = next_hwl; 675 hwl = next_hwl;
676 } 676 }
677 break; 677 break;
@@ -1668,7 +1668,7 @@ call_hello_update_cb_async (void *cls,
1668 GNUNET_assert (NULL != ghh->notify_task); 1668 GNUNET_assert (NULL != ghh->notify_task);
1669 ghh->notify_task = NULL; 1669 ghh->notify_task = NULL;
1670 ghh->rec (ghh->rec_cls, 1670 ghh->rec (ghh->rec_cls,
1671 (const struct GNUNET_MessageHeader *) ghh->handle->my_hello); 1671 ghh->handle->my_hello);
1672} 1672}
1673 1673
1674 1674
@@ -1696,7 +1696,7 @@ GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
1696 hwl->rec_cls = rec_cls; 1696 hwl->rec_cls = rec_cls;
1697 hwl->handle = handle; 1697 hwl->handle = handle;
1698 GNUNET_CONTAINER_DLL_insert (handle->hwl_head, handle->hwl_tail, hwl); 1698 GNUNET_CONTAINER_DLL_insert (handle->hwl_head, handle->hwl_tail, hwl);
1699 if (handle->my_hello != NULL) 1699 if (NULL != handle->my_hello)
1700 hwl->notify_task = GNUNET_SCHEDULER_add_now (&call_hello_update_cb_async, 1700 hwl->notify_task = GNUNET_SCHEDULER_add_now (&call_hello_update_cb_async,
1701 hwl); 1701 hwl);
1702 return hwl; 1702 return hwl;