diff options
Diffstat (limited to 'src/cadet/cadet_api_new.c')
-rw-r--r-- | src/cadet/cadet_api_new.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cadet/cadet_api_new.c b/src/cadet/cadet_api_new.c index 673764813..7ed681a9d 100644 --- a/src/cadet/cadet_api_new.c +++ b/src/cadet/cadet_api_new.c | |||
@@ -1635,17 +1635,7 @@ GNUNET_CADET_open_porT (struct GNUNET_CADET_Handle *h, | |||
1635 | p->cls = connects_cls; | 1635 | p->cls = connects_cls; |
1636 | p->window_changes = window_changes; | 1636 | p->window_changes = window_changes; |
1637 | p->disconnects = disconnects; | 1637 | p->disconnects = disconnects; |
1638 | if (NULL != handlers) | 1638 | p->handlers = GNUNET_MQ_copy_handlers (handlers); |
1639 | { | ||
1640 | unsigned int i; | ||
1641 | |||
1642 | for (i=0;NULL != handlers[i].cb; i++) ; | ||
1643 | p->handlers = GNUNET_new_array (i + 1, | ||
1644 | struct GNUNET_MQ_MessageHandler); | ||
1645 | GNUNET_memcpy ((struct GNUNET_MQ_MessageHandler *) p->handlers, | ||
1646 | handlers, | ||
1647 | i * sizeof (struct GNUNET_MQ_MessageHandler)); | ||
1648 | } | ||
1649 | 1639 | ||
1650 | GNUNET_assert (GNUNET_OK == | 1640 | GNUNET_assert (GNUNET_OK == |
1651 | GNUNET_CONTAINER_multihashmap_put (h->ports, | 1641 | GNUNET_CONTAINER_multihashmap_put (h->ports, |