aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-service-conversation.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-service-conversation.c')
-rw-r--r--src/conversation/gnunet-service-conversation.c36
1 files changed, 24 insertions, 12 deletions
diff --git a/src/conversation/gnunet-service-conversation.c b/src/conversation/gnunet-service-conversation.c
index 7d319e51e..fb9eec26e 100644
--- a/src/conversation/gnunet-service-conversation.c
+++ b/src/conversation/gnunet-service-conversation.c
@@ -2,20 +2,18 @@
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2013, 2016, 2017 GNUnet e.V. 3 Copyright (C) 2013, 2016, 2017 GNUnet e.V.
4 4
5 GNUnet is free software; you can redistribute it and/or modify 5 GNUnet is free software: you can redistribute it and/or modify it
6 it under the terms of the GNU General Public License as published 6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation; either version 3, or (at your 7 by the Free Software Foundation, either version 3 of the License,
8 option) any later version. 8 or (at your option) any later version.
9 9
10 GNUnet is distributed in the hope that it will be useful, but 10 GNUnet is distributed in the hope that it will be useful, but
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 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 General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with GNUnet; see the file COPYING. If not, write to the 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/ 17*/
20/** 18/**
21 * @file conversation/gnunet-service-conversation.c 19 * @file conversation/gnunet-service-conversation.c
@@ -605,6 +603,8 @@ static int
605check_client_audio_message (void *cls, 603check_client_audio_message (void *cls,
606 const struct ClientAudioMessage *msg) 604 const struct ClientAudioMessage *msg)
607{ 605{
606 (void) cls;
607 (void) msg;
608 return GNUNET_OK; 608 return GNUNET_OK;
609} 609}
610 610
@@ -771,6 +771,7 @@ handle_cadet_hangup_message (void *cls,
771 enum ChannelStatus status; 771 enum ChannelStatus status;
772 uint32_t cid; 772 uint32_t cid;
773 773
774 (void) message;
774 GNUNET_CADET_receive_done (ch->channel); 775 GNUNET_CADET_receive_done (ch->channel);
775 cid = ch->cid; 776 cid = ch->cid;
776 status = ch->status; 777 status = ch->status;
@@ -816,6 +817,7 @@ handle_cadet_pickup_message (void *cls,
816 struct GNUNET_MQ_Envelope *env; 817 struct GNUNET_MQ_Envelope *env;
817 struct ClientPhonePickedupMessage *pick; 818 struct ClientPhonePickedupMessage *pick;
818 819
820 (void) message;
819 GNUNET_CADET_receive_done (ch->channel); 821 GNUNET_CADET_receive_done (ch->channel);
820 switch (ch->status) 822 switch (ch->status)
821 { 823 {
@@ -865,6 +867,7 @@ handle_cadet_suspend_message (void *cls,
865 struct GNUNET_MQ_Envelope *env; 867 struct GNUNET_MQ_Envelope *env;
866 struct ClientPhoneSuspendMessage *suspend; 868 struct ClientPhoneSuspendMessage *suspend;
867 869
870 (void) message;
868 GNUNET_CADET_receive_done (ch->channel); 871 GNUNET_CADET_receive_done (ch->channel);
869 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 872 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
870 "Suspending channel CID: %u\n", 873 "Suspending channel CID: %u\n",
@@ -914,6 +917,7 @@ handle_cadet_resume_message (void *cls,
914 struct GNUNET_MQ_Envelope *env; 917 struct GNUNET_MQ_Envelope *env;
915 struct ClientPhoneResumeMessage *resume; 918 struct ClientPhoneResumeMessage *resume;
916 919
920 (void) msg;
917 line = ch->line; 921 line = ch->line;
918 GNUNET_CADET_receive_done (ch->channel); 922 GNUNET_CADET_receive_done (ch->channel);
919 if (GNUNET_YES != ch->suspended_remote) 923 if (GNUNET_YES != ch->suspended_remote)
@@ -964,6 +968,8 @@ static int
964check_cadet_audio_message (void *cls, 968check_cadet_audio_message (void *cls,
965 const struct CadetAudioMessage *msg) 969 const struct CadetAudioMessage *msg)
966{ 970{
971 (void) cls;
972 (void) msg;
967 return GNUNET_OK; /* any payload is fine */ 973 return GNUNET_OK; /* any payload is fine */
968} 974}
969 975
@@ -1152,6 +1158,7 @@ inbound_channel (void *cls,
1152 struct Line *line = cls; 1158 struct Line *line = cls;
1153 struct Channel *ch; 1159 struct Channel *ch;
1154 1160
1161 (void) initiator;
1155 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1162 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1156 "Received incoming cadet channel on line %p\n", 1163 "Received incoming cadet channel on line %p\n",
1157 line); 1164 line);
@@ -1183,6 +1190,7 @@ client_connect_cb (void *cls,
1183{ 1190{
1184 struct Line *line; 1191 struct Line *line;
1185 1192
1193 (void) cls;
1186 line = GNUNET_new (struct Line); 1194 line = GNUNET_new (struct Line);
1187 line->client = client; 1195 line->client = client;
1188 line->mq = mq; 1196 line->mq = mq;
@@ -1203,9 +1211,10 @@ client_disconnect_cb (void *cls,
1203 void *app_ctx) 1211 void *app_ctx)
1204{ 1212{
1205 struct Line *line = app_ctx; 1213 struct Line *line = app_ctx;
1206 struct Channel *ch;
1207 struct Channel *chn; 1214 struct Channel *chn;
1208 1215
1216 (void) cls;
1217 (void) client;
1209 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1218 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1210 "Client disconnected, closing line\n"); 1219 "Client disconnected, closing line\n");
1211 if (NULL != line->port) 1220 if (NULL != line->port)
@@ -1213,7 +1222,7 @@ client_disconnect_cb (void *cls,
1213 GNUNET_CADET_close_port (line->port); 1222 GNUNET_CADET_close_port (line->port);
1214 line->port = NULL; 1223 line->port = NULL;
1215 } 1224 }
1216 for (ch = line->channel_head; NULL != ch; ch = chn) 1225 for (struct Channel *ch = line->channel_head; NULL != ch; ch = chn)
1217 { 1226 {
1218 chn = ch->next; 1227 chn = ch->next;
1219 ch->line = NULL; 1228 ch->line = NULL;
@@ -1290,6 +1299,7 @@ handle_client_register_message (void *cls,
1290static void 1299static void
1291do_shutdown (void *cls) 1300do_shutdown (void *cls)
1292{ 1301{
1302 (void) cls;
1293 if (NULL != cadet) 1303 if (NULL != cadet)
1294 { 1304 {
1295 GNUNET_CADET_disconnect (cadet); 1305 GNUNET_CADET_disconnect (cadet);
@@ -1310,6 +1320,8 @@ run (void *cls,
1310 const struct GNUNET_CONFIGURATION_Handle *c, 1320 const struct GNUNET_CONFIGURATION_Handle *c,
1311 struct GNUNET_SERVICE_Handle *service) 1321 struct GNUNET_SERVICE_Handle *service)
1312{ 1322{
1323 (void) cls;
1324 (void) service;
1313 cfg = c; 1325 cfg = c;
1314 GNUNET_assert (GNUNET_OK == 1326 GNUNET_assert (GNUNET_OK ==
1315 GNUNET_CRYPTO_get_peer_identity (cfg, 1327 GNUNET_CRYPTO_get_peer_identity (cfg,