aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cadet/gnunet-service-cadet-new.c12
-rw-r--r--src/cadet/gnunet-service-cadet-new_channel.c13
-rw-r--r--src/cadet/test_cadet.c9
3 files changed, 15 insertions, 19 deletions
diff --git a/src/cadet/gnunet-service-cadet-new.c b/src/cadet/gnunet-service-cadet-new.c
index ef0870158..441511e45 100644
--- a/src/cadet/gnunet-service-cadet-new.c
+++ b/src/cadet/gnunet-service-cadet-new.c
@@ -282,7 +282,7 @@ GSC_bind (struct CadetClient *c,
282 uint32_t options) 282 uint32_t options)
283{ 283{
284 struct GNUNET_MQ_Envelope *env; 284 struct GNUNET_MQ_Envelope *env;
285 struct GNUNET_CADET_LocalChannelCreateMessage *msg; 285 struct GNUNET_CADET_LocalChannelCreateMessage *cm;
286 struct GNUNET_CADET_ClientChannelNumber ccn; 286 struct GNUNET_CADET_ClientChannelNumber ccn;
287 287
288 ccn = client_get_next_ccn (c); 288 ccn = client_get_next_ccn (c);
@@ -298,12 +298,12 @@ GSC_bind (struct CadetClient *c,
298 GNUNET_h2s (port), 298 GNUNET_h2s (port),
299 ntohl (options)); 299 ntohl (options));
300 /* notify local client about incoming connection! */ 300 /* notify local client about incoming connection! */
301 env = GNUNET_MQ_msg (msg, 301 env = GNUNET_MQ_msg (cm,
302 GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE); 302 GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE);
303 msg->ccn = ccn; 303 cm->ccn = ccn;
304 msg->port = *port; 304 cm->port = *port;
305 msg->opt = htonl (options); 305 cm->opt = htonl (options);
306 msg->peer = *GCP_get_id (dest); 306 cm->peer = *GCP_get_id (dest);
307 GSC_send_to_client (c, 307 GSC_send_to_client (c,
308 env); 308 env);
309 return ccn; 309 return ccn;
diff --git a/src/cadet/gnunet-service-cadet-new_channel.c b/src/cadet/gnunet-service-cadet-new_channel.c
index 673921458..45609107b 100644
--- a/src/cadet/gnunet-service-cadet-new_channel.c
+++ b/src/cadet/gnunet-service-cadet-new_channel.c
@@ -804,8 +804,6 @@ void
804GCCH_bind (struct CadetChannel *ch, 804GCCH_bind (struct CadetChannel *ch,
805 struct CadetClient *c) 805 struct CadetClient *c)
806{ 806{
807 struct GNUNET_MQ_Envelope *env;
808 struct GNUNET_CADET_LocalChannelCreateMessage *tcm;
809 uint32_t options; 807 uint32_t options;
810 808
811 LOG (GNUNET_ERROR_TYPE_DEBUG, 809 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -850,17 +848,6 @@ GCCH_bind (struct CadetChannel *ch,
850 ch); 848 ch);
851 } 849 }
852 /* give client it's initial supply of ACKs */ 850 /* give client it's initial supply of ACKs */
853 env = GNUNET_MQ_msg (tcm,
854 GNUNET_MESSAGE_TYPE_CADET_LOCAL_CHANNEL_CREATE);
855 tcm->ccn = ch->ccn_dest;
856 if (GNUNET_YES == ch->is_loopback)
857 tcm->peer = my_full_id;
858 else
859 tcm->peer = *GCP_get_id (GCT_get_destination (ch->t));
860 tcm->port = ch->port;
861 tcm->opt = htonl (options);
862 GSC_send_to_client (ch->dest,
863 env);
864 for (unsigned int i=0;i<ch->max_pending_messages;i++) 851 for (unsigned int i=0;i<ch->max_pending_messages;i++)
865 send_ack_to_client (ch, 852 send_ack_to_client (ch,
866 ch->dest); 853 ch->dest);
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index 16466ca0d..ce0178bd5 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -787,7 +787,16 @@ incoming_channel (void *cls,
787 ok++; 787 ok++;
788 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: %d\n", ok); 788 GNUNET_log (GNUNET_ERROR_TYPE_INFO, " ok: %d\n", ok);
789 if ((long) cls == peers_requested - 1) 789 if ((long) cls == peers_requested - 1)
790 {
791 if (NULL != incoming_ch)
792 {
793 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
794 "Duplicate incoming channel for client %lu\n",
795 (long) cls);
796 GNUNET_break(0);
797 }
790 incoming_ch = channel; 798 incoming_ch = channel;
799 }
791 else 800 else
792 { 801 {
793 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 802 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,