diff options
Diffstat (limited to 'src/cadet/cadet_api.c')
-rw-r--r-- | src/cadet/cadet_api.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c index e141787a0..ff6f15543 100644 --- a/src/cadet/cadet_api.c +++ b/src/cadet/cadet_api.c | |||
@@ -11,7 +11,7 @@ | |||
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Affero General Public License for more details. | 13 | Affero General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Affero General Public License | 15 | You should have received a copy of the GNU Affero General Public License |
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 | ||
@@ -134,11 +134,6 @@ struct GNUNET_CADET_Channel | |||
134 | struct GNUNET_CADET_ClientChannelNumber ccn; | 134 | struct GNUNET_CADET_ClientChannelNumber ccn; |
135 | 135 | ||
136 | /** | 136 | /** |
137 | * Channel options: reliability, etc. | ||
138 | */ | ||
139 | enum GNUNET_CADET_ChannelOption options; | ||
140 | |||
141 | /** | ||
142 | * How many messages are we allowed to send to the service right now? | 137 | * How many messages are we allowed to send to the service right now? |
143 | */ | 138 | */ |
144 | unsigned int allow_send; | 139 | unsigned int allow_send; |
@@ -578,7 +573,6 @@ handle_channel_created ( | |||
578 | ch = create_channel (h, &ccn); | 573 | ch = create_channel (h, &ccn); |
579 | ch->peer = msg->peer; | 574 | ch->peer = msg->peer; |
580 | ch->incoming_port = port; | 575 | ch->incoming_port = port; |
581 | ch->options = ntohl (msg->opt); | ||
582 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 576 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
583 | "Creating incoming channel %X [%s] %p\n", | 577 | "Creating incoming channel %X [%s] %p\n", |
584 | ntohl (ccn.channel_of_client), | 578 | ntohl (ccn.channel_of_client), |
@@ -938,25 +932,13 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel) | |||
938 | */ | 932 | */ |
939 | const union GNUNET_CADET_ChannelInfo * | 933 | const union GNUNET_CADET_ChannelInfo * |
940 | GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, | 934 | GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel, |
941 | enum GNUNET_CADET_ChannelOption option, | 935 | enum GNUNET_CADET_ChannelInfoOption option, |
942 | ...) | 936 | ...) |
943 | { | 937 | { |
944 | static int bool_flag; | ||
945 | |||
946 | switch (option) | 938 | switch (option) |
947 | { | 939 | { |
948 | case GNUNET_CADET_OPTION_NOBUFFER: | ||
949 | case GNUNET_CADET_OPTION_RELIABLE: | ||
950 | case GNUNET_CADET_OPTION_OUT_OF_ORDER: | ||
951 | if (0 != (option & channel->options)) | ||
952 | bool_flag = GNUNET_YES; | ||
953 | else | ||
954 | bool_flag = GNUNET_NO; | ||
955 | return (const union GNUNET_CADET_ChannelInfo *) &bool_flag; | ||
956 | break; | ||
957 | case GNUNET_CADET_OPTION_PEER: | 940 | case GNUNET_CADET_OPTION_PEER: |
958 | return (const union GNUNET_CADET_ChannelInfo *) &channel->peer; | 941 | return (const union GNUNET_CADET_ChannelInfo *) &channel->peer; |
959 | break; | ||
960 | default: | 942 | default: |
961 | GNUNET_break (0); | 943 | GNUNET_break (0); |
962 | return NULL; | 944 | return NULL; |
@@ -1089,7 +1071,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h, | |||
1089 | void *channel_cls, | 1071 | void *channel_cls, |
1090 | const struct GNUNET_PeerIdentity *destination, | 1072 | const struct GNUNET_PeerIdentity *destination, |
1091 | const struct GNUNET_HashCode *port, | 1073 | const struct GNUNET_HashCode *port, |
1092 | enum GNUNET_CADET_ChannelOption options, | ||
1093 | GNUNET_CADET_WindowSizeEventHandler window_changes, | 1074 | GNUNET_CADET_WindowSizeEventHandler window_changes, |
1094 | GNUNET_CADET_DisconnectEventHandler disconnects, | 1075 | GNUNET_CADET_DisconnectEventHandler disconnects, |
1095 | const struct GNUNET_MQ_MessageHandler *handlers) | 1076 | const struct GNUNET_MQ_MessageHandler *handlers) |
@@ -1106,7 +1087,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h, | |||
1106 | ch = create_channel (h, NULL); | 1087 | ch = create_channel (h, NULL); |
1107 | ch->ctx = channel_cls; | 1088 | ch->ctx = channel_cls; |
1108 | ch->peer = *destination; | 1089 | ch->peer = *destination; |
1109 | ch->options = options; | ||
1110 | ch->window_changes = window_changes; | 1090 | ch->window_changes = window_changes; |
1111 | ch->disconnects = disconnects; | 1091 | ch->disconnects = disconnects; |
1112 | 1092 | ||
@@ -1125,7 +1105,6 @@ GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h, | |||
1125 | msg->ccn = ch->ccn; | 1105 | msg->ccn = ch->ccn; |
1126 | msg->port = *port; | 1106 | msg->port = *port; |
1127 | msg->peer = *destination; | 1107 | msg->peer = *destination; |
1128 | msg->opt = htonl (options); | ||
1129 | GNUNET_MQ_send (h->mq, env); | 1108 | GNUNET_MQ_send (h->mq, env); |
1130 | return ch; | 1109 | return ch; |
1131 | } | 1110 | } |