aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/conversation_api_call.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/conversation_api_call.c')
-rw-r--r--src/conversation/conversation_api_call.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/conversation/conversation_api_call.c b/src/conversation/conversation_api_call.c
index cd1bf8f86..af05f3ea6 100644
--- a/src/conversation/conversation_api_call.c
+++ b/src/conversation/conversation_api_call.c
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet 2 This file is part of GNUnet
3 Copyright (C) 2013 GNUnet e.V. 3 Copyright (C) 2013, 2016 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
6 it under the terms of the GNU General Public License as published 6 it under the terms of the GNU General Public License as published
@@ -177,8 +177,11 @@ transmit_call_audio (void *cls,
177 e = GNUNET_MQ_msg_extra (am, 177 e = GNUNET_MQ_msg_extra (am,
178 data_size, 178 data_size,
179 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO); 179 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO);
180 GNUNET_memcpy (&am[1], data, data_size); 180 GNUNET_memcpy (&am[1],
181 GNUNET_MQ_send (call->mq, e); 181 data,
182 data_size);
183 GNUNET_MQ_send (call->mq,
184 e);
182} 185}
183 186
184 187
@@ -345,7 +348,8 @@ handle_call_hangup (void *cls,
345 eh = call->event_handler; 348 eh = call->event_handler;
346 eh_cls = call->event_handler_cls; 349 eh_cls = call->event_handler_cls;
347 GNUNET_CONVERSATION_call_stop (call); 350 GNUNET_CONVERSATION_call_stop (call);
348 eh (eh_cls, GNUNET_CONVERSATION_EC_CALL_HUNG_UP); 351 eh (eh_cls,
352 GNUNET_CONVERSATION_EC_CALL_HUNG_UP);
349 return; 353 return;
350 case CS_SHUTDOWN: 354 case CS_SHUTDOWN:
351 GNUNET_CONVERSATION_call_stop (call); 355 GNUNET_CONVERSATION_call_stop (call);
@@ -443,13 +447,15 @@ handle_gns_response (void *cls,
443 continue; 447 continue;
444 } 448 }
445 GNUNET_memcpy (&call->phone_record, 449 GNUNET_memcpy (&call->phone_record,
446 rd[i].data, 450 rd[i].data,
447 rd[i].data_size); 451 rd[i].data_size);
448 e = GNUNET_MQ_msg (ccm, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL); 452 e = GNUNET_MQ_msg (ccm,
449 ccm->line = call->phone_record.line; 453 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL);
454 ccm->line_port = call->phone_record.line_port;
450 ccm->target = call->phone_record.peer; 455 ccm->target = call->phone_record.peer;
451 ccm->caller_id = *GNUNET_IDENTITY_ego_get_private_key (call->caller_id); 456 ccm->caller_id = *GNUNET_IDENTITY_ego_get_private_key (call->caller_id);
452 GNUNET_MQ_send (call->mq, e); 457 GNUNET_MQ_send (call->mq,
458 e);
453 call->state = CS_RINGING; 459 call->state = CS_RINGING;
454 call->event_handler (call->event_handler_cls, 460 call->event_handler (call->event_handler_cls,
455 GNUNET_CONVERSATION_EC_CALL_RINGING); 461 GNUNET_CONVERSATION_EC_CALL_RINGING);
@@ -663,8 +669,10 @@ GNUNET_CONVERSATION_call_suspend (struct GNUNET_CONVERSATION_Call *call)
663 } 669 }
664 call->speaker = NULL; 670 call->speaker = NULL;
665 call->mic = NULL; 671 call->mic = NULL;
666 e = GNUNET_MQ_msg (suspend, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND); 672 e = GNUNET_MQ_msg (suspend,
667 GNUNET_MQ_send (call->mq, e); 673 GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND);
674 GNUNET_MQ_send (call->mq,
675 e);
668 if (CS_SUSPENDED_CALLER == call->state) 676 if (CS_SUSPENDED_CALLER == call->state)
669 call->state = CS_SUSPENDED_BOTH; 677 call->state = CS_SUSPENDED_BOTH;
670 else 678 else