aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/cadet_api.c
diff options
context:
space:
mode:
authort3sserakt <t3ss@posteo.de>2019-06-24 11:47:25 +0200
committert3sserakt <t3ss@posteo.de>2019-06-24 11:47:25 +0200
commitd2ed51b63d955a590a461e911a3d6fa6a9248fe5 (patch)
tree3a9b7293435e61706986d84d0f6b80f385657ebb /src/cadet/cadet_api.c
parenta31cd73472ac1b4c899a6e1d7e53851c20677f7d (diff)
downloadgnunet-d2ed51b63d955a590a461e911a3d6fa6a9248fe5.tar.gz
gnunet-d2ed51b63d955a590a461e911a3d6fa6a9248fe5.zip
removed GNUNET_CADET_ChannelOption
Diffstat (limited to 'src/cadet/cadet_api.c')
-rw-r--r--src/cadet/cadet_api.c31
1 files changed, 1 insertions, 30 deletions
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index b0016d2a8..8638be27d 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -135,11 +135,6 @@ struct GNUNET_CADET_Channel
135 struct GNUNET_CADET_ClientChannelNumber ccn; 135 struct GNUNET_CADET_ClientChannelNumber ccn;
136 136
137 /** 137 /**
138 * Channel options: reliability, etc.
139 */
140 enum GNUNET_CADET_ChannelOption options;
141
142 /**
143 * How many messages are we allowed to send to the service right now? 138 * How many messages are we allowed to send to the service right now?
144 */ 139 */
145 unsigned int allow_send; 140 unsigned int allow_send;
@@ -592,7 +587,6 @@ handle_channel_created (void *cls,
592 &ccn); 587 &ccn);
593 ch->peer = msg->peer; 588 ch->peer = msg->peer;
594 ch->incoming_port = port; 589 ch->incoming_port = port;
595 ch->options = ntohl (msg->opt);
596 LOG (GNUNET_ERROR_TYPE_DEBUG, 590 LOG (GNUNET_ERROR_TYPE_DEBUG,
597 "Creating incoming channel %X [%s] %p\n", 591 "Creating incoming channel %X [%s] %p\n",
598 ntohl (ccn.channel_of_client), 592 ntohl (ccn.channel_of_client),
@@ -982,29 +976,9 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel)
982 */ 976 */
983const union GNUNET_CADET_ChannelInfo * 977const union GNUNET_CADET_ChannelInfo *
984GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, 978GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel,
985 enum GNUNET_CADET_ChannelOption option,
986 ...) 979 ...)
987{ 980{
988 static int bool_flag; 981 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer;
989
990 switch (option)
991 {
992 case GNUNET_CADET_OPTION_NOBUFFER:
993 case GNUNET_CADET_OPTION_RELIABLE:
994 case GNUNET_CADET_OPTION_OUT_OF_ORDER:
995 if (0 != (option & channel->options))
996 bool_flag = GNUNET_YES;
997 else
998 bool_flag = GNUNET_NO;
999 return (const union GNUNET_CADET_ChannelInfo *) &bool_flag;
1000 break;
1001 case GNUNET_CADET_OPTION_PEER:
1002 return (const union GNUNET_CADET_ChannelInfo *) &channel->peer;
1003 break;
1004 default:
1005 GNUNET_break (0);
1006 return NULL;
1007 }
1008} 982}
1009 983
1010 984
@@ -1140,7 +1114,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
1140 void *channel_cls, 1114 void *channel_cls,
1141 const struct GNUNET_PeerIdentity *destination, 1115 const struct GNUNET_PeerIdentity *destination,
1142 const struct GNUNET_HashCode *port, 1116 const struct GNUNET_HashCode *port,
1143 enum GNUNET_CADET_ChannelOption options,
1144 GNUNET_CADET_WindowSizeEventHandler window_changes, 1117 GNUNET_CADET_WindowSizeEventHandler window_changes,
1145 GNUNET_CADET_DisconnectEventHandler disconnects, 1118 GNUNET_CADET_DisconnectEventHandler disconnects,
1146 const struct GNUNET_MQ_MessageHandler *handlers) 1119 const struct GNUNET_MQ_MessageHandler *handlers)
@@ -1158,7 +1131,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
1158 NULL); 1131 NULL);
1159 ch->ctx = channel_cls; 1132 ch->ctx = channel_cls;
1160 ch->peer = *destination; 1133 ch->peer = *destination;
1161 ch->options = options;
1162 ch->window_changes = window_changes; 1134 ch->window_changes = window_changes;
1163 ch->disconnects = disconnects; 1135 ch->disconnects = disconnects;
1164 1136
@@ -1179,7 +1151,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
1179 msg->ccn = ch->ccn; 1151 msg->ccn = ch->ccn;
1180 msg->port = *port; 1152 msg->port = *port;
1181 msg->peer = *destination; 1153 msg->peer = *destination;
1182 msg->opt = htonl (options);
1183 GNUNET_MQ_send (h->mq, 1154 GNUNET_MQ_send (h->mq,
1184 env); 1155 env);
1185 return ch; 1156 return ch;