GNUnet 0.21.0
conversation_api_call.c File Reference

call API to the conversation service More...

Include dependency graph for conversation_api_call.c:

Go to the source code of this file.

Data Structures

struct  GNUNET_CONVERSATION_Call
 Handle for an outgoing call. More...
 

Enumerations

enum  CallState {
  CS_LOOKUP = 0 , CS_RINGING , CS_ACTIVE , CS_SHUTDOWN ,
  CS_SUSPENDED_CALLER , CS_SUSPENDED_CALLEE , CS_SUSPENDED_BOTH , CS_RESOLVING ,
  CS_RINGING , CS_CONNECTED , CS_SUSPENDED
}
 Possible states of the phone. More...
 

Functions

static void fail_call (struct GNUNET_CONVERSATION_Call *call)
 The call got disconnected, reconnect to the service. More...
 
static void transmit_call_audio (void *cls, size_t data_size, const void *data)
 Process recorded audio data. More...
 
static void handle_call_suspend (void *cls, const struct ClientPhoneSuspendMessage *msg)
 We received a GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND. More...
 
static void handle_call_resume (void *cls, const struct ClientPhoneResumeMessage *msg)
 We received a GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME. More...
 
static void handle_call_picked_up (void *cls, const struct ClientPhonePickedupMessage *msg)
 We received a GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP. More...
 
static void handle_call_hangup (void *cls, const struct ClientPhoneHangupMessage *msg)
 We received a #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_HANG_UP. More...
 
static int check_call_audio (void *cls, const struct ClientAudioMessage *am)
 We received a struct ClientAudioMessage, check it is well-formed. More...
 
static void handle_call_audio (void *cls, const struct ClientAudioMessage *am)
 We received a struct ClientAudioMessage More...
 
static void handle_gns_response (void *cls, int was_gns, uint32_t rd_count, const struct GNUNET_GNSRECORD_Data *rd)
 Iterator called on obtained result for a GNS lookup. More...
 
static void call_error_handler (void *cls, enum GNUNET_MQ_Error error)
 We encountered an error talking with the conversation service. More...
 
struct GNUNET_CONVERSATION_CallGNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, struct GNUNET_IDENTITY_Ego *caller_id, const char *callee, struct GNUNET_SPEAKER_Handle *speaker, struct GNUNET_MICROPHONE_Handle *mic, GNUNET_CONVERSATION_CallEventHandler event_handler, void *event_handler_cls)
 Call the phone of another user. More...
 
void GNUNET_CONVERSATION_call_stop (struct GNUNET_CONVERSATION_Call *call)
 Terminate a call. More...
 
void GNUNET_CONVERSATION_call_suspend (struct GNUNET_CONVERSATION_Call *call)
 Pause a call. More...
 
void GNUNET_CONVERSATION_call_resume (struct GNUNET_CONVERSATION_Call *call, struct GNUNET_SPEAKER_Handle *speaker, struct GNUNET_MICROPHONE_Handle *mic)
 Resumes a call after GNUNET_CONVERSATION_call_suspend. More...
 

Detailed Description

call API to the conversation service

Author
Simon Dieterle
Andreas Fuchs
Christian Grothoff

Definition in file conversation_api_call.c.

Enumeration Type Documentation

◆ CallState

enum CallState

Possible states of the phone.

Enumerator
CS_LOOKUP 

We still need to lookup the callee.

CS_RINGING 

The call is ringing.

CS_ACTIVE 

The call is in an active conversation.

CS_SHUTDOWN 

The call is in termination.

CS_SUSPENDED_CALLER 

The call was suspended by the caller.

CS_SUSPENDED_CALLEE 

The call was suspended by the callee.

CS_SUSPENDED_BOTH 

The call was suspended by both caller and callee.

CS_RESOLVING 

We are looking up some other participant.

CS_RINGING 

We are now ringing the other participant.

CS_CONNECTED 

The other party accepted our call and we are now connected.

CS_SUSPENDED 

The call is currently suspended (by us).

Definition at line 38 of file conversation_api_call.c.

39{
43 CS_LOOKUP = 0,
44
49
54
59
64
69
74};
@ CS_LOOKUP
We still need to lookup the callee.
@ CS_SUSPENDED_CALLEE
The call was suspended by the callee.
@ CS_SHUTDOWN
The call is in termination.
@ CS_SUSPENDED_CALLER
The call was suspended by the caller.
@ CS_SUSPENDED_BOTH
The call was suspended by both caller and callee.
@ CS_ACTIVE
The call is in an active conversation.
@ CS_RINGING
The call is ringing.

Function Documentation

◆ fail_call()

static void fail_call ( struct GNUNET_CONVERSATION_Call call)
static

The call got disconnected, reconnect to the service.

The call got disconnected, destroy the handle.

Parameters
callcall to reconnect

Definition at line 532 of file conversation_api_call.c.

533{
534 if (CS_ACTIVE == call->state)
535 {
538 }
539 if (NULL != call->mq)
540 {
542 call->mq = NULL;
543 }
548}
static struct GNUNET_CONVERSATION_Call * call
Call handle (for active outgoing call).
void GNUNET_CONVERSATION_call_stop(struct GNUNET_CONVERSATION_Call *call)
Terminate a call.
@ GNUNET_CONVERSATION_EC_CALL_ERROR
We had an error handing the call, and are now restarting it (back to lookup).
void GNUNET_MQ_destroy(struct GNUNET_MQ_Handle *mq)
Destroy the message queue.
Definition: mq.c:683
void * event_handler_cls
Closure for event_handler.
struct GNUNET_MICROPHONE_Handle * mic
Our microphone.
enum CallState state
State machine for the call.
struct GNUNET_MQ_Handle * mq
Handle for transmitting to the CONVERSATION service.
struct GNUNET_SPEAKER_Handle * speaker
Our speaker.
GNUNET_CONVERSATION_CallEventHandler event_handler
Function to call with events.
void * cls
Closure for the callbacks.
GNUNET_MICROPHONE_DisableCallback disable_microphone
Turn the microphone off.
void * cls
Closure for the callbacks.
GNUNET_SPEAKER_DisableCallback disable_speaker
Turn the speaker off.

References call, GNUNET_MICROPHONE_Handle::cls, GNUNET_SPEAKER_Handle::cls, CS_ACTIVE, CS_SHUTDOWN, GNUNET_MICROPHONE_Handle::disable_microphone, GNUNET_SPEAKER_Handle::disable_speaker, GNUNET_CONVERSATION_Call::event_handler, GNUNET_CONVERSATION_Call::event_handler_cls, GNUNET_CONVERSATION_call_stop(), GNUNET_CONVERSATION_EC_CALL_ERROR, GNUNET_MQ_destroy(), GNUNET_CONVERSATION_Call::mic, GNUNET_CONVERSATION_Call::mq, GNUNET_CONVERSATION_Call::speaker, and GNUNET_CONVERSATION_Call::state.

Referenced by call_error_handler(), handle_call_audio(), handle_call_hangup(), handle_call_picked_up(), handle_call_resume(), and handle_call_suspend().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transmit_call_audio()

static void transmit_call_audio ( void *  cls,
size_t  data_size,
const void *  data 
)
static

Process recorded audio data.

Parameters
clsclosure with the struct GNUNET_CONVERSATION_Call
data_sizenumber of bytes in data
dataaudio data to play

Definition at line 161 of file conversation_api_call.c.

164{
165 struct GNUNET_CONVERSATION_Call *call = cls;
166 struct GNUNET_MQ_Envelope *e;
167 struct ClientAudioMessage *am;
168
170 e = GNUNET_MQ_msg_extra (am,
171 data_size,
173 GNUNET_memcpy (&am[1],
174 data,
175 data_size);
177 e);
178}
static char * data
The data to insert into the dht.
static size_t data_size
Number of bytes in data.
#define GNUNET_memcpy(dst, src, n)
Call memcpy() but check for n being 0 first.
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:304
#define GNUNET_MQ_msg_extra(mvar, esize, type)
Allocate an envelope, with extra space allocated after the space needed by the message struct.
Definition: gnunet_mq_lib.h:63
#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO
Client <-> Server message to send audio data.
Message Client <-> Service to transmit the audio.
Definition: conversation.h:195
Handle for an outgoing call.

References call, CS_ACTIVE, data, data_size, GNUNET_assert, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), GNUNET_CONVERSATION_Call::mq, and GNUNET_CONVERSATION_Call::state.

Referenced by GNUNET_CONVERSATION_call_resume(), handle_call_picked_up(), and handle_call_resume().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ handle_call_suspend()

static void handle_call_suspend ( void *  cls,
const struct ClientPhoneSuspendMessage msg 
)
static

We received a GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_SUSPEND.

Parameters
clsthe struct GNUNET_CONVERSATION_Call
msgthe message

Definition at line 188 of file conversation_api_call.c.

190{
191 struct GNUNET_CONVERSATION_Call *call = cls;
192
193 (void) msg;
194 switch (call->state)
195 {
196 case CS_LOOKUP:
197 GNUNET_break (0);
198 fail_call (call);
199 break;
200
201 case CS_RINGING:
202 GNUNET_break_op (0);
203 fail_call (call);
204 break;
205
210 break;
211
214 GNUNET_break_op (0);
215 break;
216
217 case CS_ACTIVE:
223 break;
224
225 case CS_SHUTDOWN:
227 break;
228 }
229}
struct GNUNET_MessageHeader * msg
Definition: 005.c:2
static void fail_call(struct GNUNET_CONVERSATION_Call *call)
The call got disconnected, reconnect to the service.
@ GNUNET_CONVERSATION_EC_CALL_SUSPENDED
We are the caller and the callee suspended the call.
#define GNUNET_break_op(cond)
Use this for assertion violations caused by other peers (i.e.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur.

References call, GNUNET_MICROPHONE_Handle::cls, GNUNET_SPEAKER_Handle::cls, CS_ACTIVE, CS_LOOKUP, CS_RINGING, CS_SHUTDOWN, CS_SUSPENDED_BOTH, CS_SUSPENDED_CALLEE, CS_SUSPENDED_CALLER, GNUNET_MICROPHONE_Handle::disable_microphone, GNUNET_SPEAKER_Handle::disable_speaker, GNUNET_CONVERSATION_Call::event_handler, GNUNET_CONVERSATION_Call::event_handler_cls, fail_call(), GNUNET_break, GNUNET_break_op, GNUNET_CONVERSATION_call_stop(), GNUNET_CONVERSATION_EC_CALL_SUSPENDED, GNUNET_CONVERSATION_Call::mic, msg, GNUNET_CONVERSATION_Call::speaker, and GNUNET_CONVERSATION_Call::state.

Here is the call graph for this function:

◆ handle_call_resume()

static void handle_call_resume ( void *  cls,
const struct ClientPhoneResumeMessage msg 
)
static

We received a GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_RESUME.

Parameters
clsthe struct GNUNET_CONVERSATION_Call
msgthe message

Definition at line 239 of file conversation_api_call.c.

241{
242 struct GNUNET_CONVERSATION_Call *call = cls;
243
244 (void) msg;
245 switch (call->state)
246 {
247 case CS_LOOKUP:
248 GNUNET_break (0);
249 fail_call (call);
250 break;
251
252 case CS_RINGING:
253 GNUNET_break_op (0);
254 fail_call (call);
255 break;
256
258 GNUNET_break_op (0);
259 break;
260
266 call);
269 break;
270
275 break;
276
277 case CS_ACTIVE:
278 GNUNET_break_op (0);
279 break;
280
281 case CS_SHUTDOWN:
283 break;
284 }
285}
static void transmit_call_audio(void *cls, size_t data_size, const void *data)
Process recorded audio data.
@ GNUNET_CONVERSATION_EC_CALL_RESUMED
We are the caller and the callee suspended the call.
GNUNET_MICROPHONE_EnableCallback enable_microphone
Turn on the microphone.
GNUNET_SPEAKER_EnableCallback enable_speaker
Turn on the speaker.

References call, GNUNET_MICROPHONE_Handle::cls, GNUNET_SPEAKER_Handle::cls, CS_ACTIVE, CS_LOOKUP, CS_RINGING, CS_SHUTDOWN, CS_SUSPENDED_BOTH, CS_SUSPENDED_CALLEE, CS_SUSPENDED_CALLER, GNUNET_MICROPHONE_Handle::enable_microphone, GNUNET_SPEAKER_Handle::enable_speaker, GNUNET_CONVERSATION_Call::event_handler, GNUNET_CONVERSATION_Call::event_handler_cls, fail_call(), GNUNET_break, GNUNET_break_op, GNUNET_CONVERSATION_call_stop(), GNUNET_CONVERSATION_EC_CALL_RESUMED, GNUNET_CONVERSATION_Call::mic, msg, GNUNET_CONVERSATION_Call::speaker, GNUNET_CONVERSATION_Call::state, and transmit_call_audio().

Here is the call graph for this function:

◆ handle_call_picked_up()

static void handle_call_picked_up ( void *  cls,
const struct ClientPhonePickedupMessage msg 
)
static

We received a GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_PICKED_UP.

Parameters
clsthe struct GNUNET_CONVERSATION_Call
msgthe message

Definition at line 295 of file conversation_api_call.c.

297{
298 struct GNUNET_CONVERSATION_Call *call = cls;
299
300 (void) msg;
301 switch (call->state)
302 {
303 case CS_LOOKUP:
304 GNUNET_break (0);
305 fail_call (call);
306 break;
307
308 case CS_RINGING:
313 call);
316 break;
317
321 case CS_ACTIVE:
322 GNUNET_break (0);
323 fail_call (call);
324 break;
325
326 case CS_SHUTDOWN:
328 break;
329 }
330}
@ GNUNET_CONVERSATION_EC_CALL_PICKED_UP
We are the caller and are now ready to talk as the callee picked up.

References call, GNUNET_MICROPHONE_Handle::cls, GNUNET_SPEAKER_Handle::cls, CS_ACTIVE, CS_LOOKUP, CS_RINGING, CS_SHUTDOWN, CS_SUSPENDED_BOTH, CS_SUSPENDED_CALLEE, CS_SUSPENDED_CALLER, GNUNET_MICROPHONE_Handle::enable_microphone, GNUNET_SPEAKER_Handle::enable_speaker, GNUNET_CONVERSATION_Call::event_handler, GNUNET_CONVERSATION_Call::event_handler_cls, fail_call(), GNUNET_break, GNUNET_CONVERSATION_call_stop(), GNUNET_CONVERSATION_EC_CALL_PICKED_UP, GNUNET_CONVERSATION_Call::mic, msg, GNUNET_CONVERSATION_Call::speaker, GNUNET_CONVERSATION_Call::state, and transmit_call_audio().

Here is the call graph for this function:

◆ handle_call_hangup()

static void handle_call_hangup ( void *  cls,
const struct ClientPhoneHangupMessage msg 
)
static

We received a #GNUNET_MESSAGE_TYPE_CONVERSATION_CS_HANG_UP.

Parameters
clsthe struct GNUNET_CONVERSATION_Call
msgthe message

Definition at line 340 of file conversation_api_call.c.

342{
343 struct GNUNET_CONVERSATION_Call *call = cls;
345 void *eh_cls;
346
347 (void) msg;
348 switch (call->state)
349 {
350 case CS_LOOKUP:
351 GNUNET_break (0);
352 fail_call (call);
353 break;
354
355 case CS_RINGING:
359 case CS_ACTIVE:
360 eh = call->event_handler;
361 eh_cls = call->event_handler_cls;
363 eh (eh_cls,
365 return;
366
367 case CS_SHUTDOWN:
369 break;
370 }
371}
void(* GNUNET_CONVERSATION_CallEventHandler)(void *cls, enum GNUNET_CONVERSATION_CallEventCode code)
Function called with an event emitted for a call.
@ GNUNET_CONVERSATION_EC_CALL_HUNG_UP
We are the caller and the callee called GNUNET_CONVERSATION_caller_hang_up.

References call, CS_ACTIVE, CS_LOOKUP, CS_RINGING, CS_SHUTDOWN, CS_SUSPENDED_BOTH, CS_SUSPENDED_CALLEE, CS_SUSPENDED_CALLER, GNUNET_CONVERSATION_Call::event_handler, GNUNET_CONVERSATION_Call::event_handler_cls, fail_call(), GNUNET_break, GNUNET_CONVERSATION_call_stop(), GNUNET_CONVERSATION_EC_CALL_HUNG_UP, msg, and GNUNET_CONVERSATION_Call::state.

Here is the call graph for this function:

◆ check_call_audio()

static int check_call_audio ( void *  cls,
const struct ClientAudioMessage am 
)
static

We received a struct ClientAudioMessage, check it is well-formed.

Parameters
clsthe struct GNUNET_CONVERSATION_Call
amthe message
Returns
GNUNET_OK (always well-formed)

Definition at line 382 of file conversation_api_call.c.

384{
385 (void) cls;
386 (void) am;
387 /* any payload is OK */
388 return GNUNET_OK;
389}
@ GNUNET_OK

References GNUNET_OK.

◆ handle_call_audio()

static void handle_call_audio ( void *  cls,
const struct ClientAudioMessage am 
)
static

We received a struct ClientAudioMessage

Parameters
clsthe struct GNUNET_CONVERSATION_Call
amthe message

Definition at line 399 of file conversation_api_call.c.

401{
402 struct GNUNET_CONVERSATION_Call *call = cls;
403
404 switch (call->state)
405 {
406 case CS_LOOKUP:
407 GNUNET_break (0);
408 fail_call (call);
409 break;
410
411 case CS_RINGING:
412 GNUNET_break (0);
413 fail_call (call);
414 break;
415
417 /* can happen: we suspended, other peer did not yet
418 learn about this. */
419 break;
420
423 /* can (rarely) also happen: other peer suspended, but cadet might
424 have had delayed data on the unreliable channel */
425 break;
426
427 case CS_ACTIVE:
429 ntohs (am->header.size) - sizeof(struct
431 &am[1]);
432 break;
433
434 case CS_SHUTDOWN:
436 break;
437 }
438}
struct GNUNET_MessageHeader header
Type is GNUNET_MESSAGE_TYPE_CONVERSATION_CS_AUDIO.
Definition: conversation.h:199
uint16_t size
The length of the struct (in bytes, including the length field itself), in big-endian format.
GNUNET_SPEAKER_PlayCallback play
Play audio.

References call, GNUNET_SPEAKER_Handle::cls, CS_ACTIVE, CS_LOOKUP, CS_RINGING, CS_SHUTDOWN, CS_SUSPENDED_BOTH, CS_SUSPENDED_CALLEE, CS_SUSPENDED_CALLER, fail_call(), GNUNET_break, GNUNET_CONVERSATION_call_stop(), ClientAudioMessage::header, GNUNET_SPEAKER_Handle::play, GNUNET_MessageHeader::size, GNUNET_CONVERSATION_Call::speaker, and GNUNET_CONVERSATION_Call::state.

Here is the call graph for this function:

◆ handle_gns_response()

static void handle_gns_response ( void *  cls,
int  was_gns,
uint32_t  rd_count,
const struct GNUNET_GNSRECORD_Data rd 
)
static

Iterator called on obtained result for a GNS lookup.

Parameters
clsclosure with the struct GNUNET_CONVERSATION_Call
was_gnsGNUNET_NO if name was not a GNS name
rd_countnumber of records in rd
rdthe records in reply

Definition at line 450 of file conversation_api_call.c.

454{
455 struct GNUNET_CONVERSATION_Call *call = cls;
456 struct GNUNET_MQ_Envelope *e;
457 struct ClientCallMessage *ccm;
458 const struct GNUNET_CRYPTO_PrivateKey *caller_id;
459 size_t key_len;
460
461 (void) was_gns;
462 GNUNET_break (NULL != call->gns_lookup);
464 call->gns_lookup = NULL;
465 for (uint32_t i = 0; i < rd_count; i++)
466 {
467 if (GNUNET_GNSRECORD_TYPE_PHONE == rd[i].record_type)
468 {
469 if (rd[i].data_size != sizeof(struct GNUNET_CONVERSATION_PhoneRecord))
470 {
471 GNUNET_break_op (0);
472 continue;
473 }
475 rd[i].data,
476 rd[i].data_size);
478 key_len = GNUNET_CRYPTO_private_key_get_length (caller_id);
479 e = GNUNET_MQ_msg_extra (ccm, key_len,
484 &ccm[1], key_len);
485 ccm->key_len = htonl (key_len);
487 e);
491 return;
492 }
493 }
494 /* not found */
498}
static unsigned int rd_count
Number of records for currently parsed set.
static struct GNUNET_GNSRECORD_Data rd[50]
The record data under a single label.
@ GNUNET_CONVERSATION_EC_CALL_GNS_FAIL
We are the caller and failed to locate a phone record in GNS.
@ GNUNET_CONVERSATION_EC_CALL_RINGING
We are the caller and are now ringing the other party (GNS lookup succeeded).
const struct GNUNET_CRYPTO_PrivateKey * GNUNET_IDENTITY_ego_get_private_key(const struct GNUNET_IDENTITY_Ego *ego)
Obtain the ECC key associated with a ego.
Definition: identity_api.c:517
ssize_t GNUNET_CRYPTO_private_key_get_length(const struct GNUNET_CRYPTO_PrivateKey *key)
Get the compacted length of a GNUNET_CRYPTO_PrivateKey.
Definition: crypto_pkey.c:47
ssize_t GNUNET_CRYPTO_write_private_key_to_buffer(const struct GNUNET_CRYPTO_PrivateKey *key, void *buffer, size_t len)
Writes a GNUNET_CRYPTO_PrivateKey to a compact buffer.
Definition: crypto_pkey.c:171
#define GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL
Client <- Server message to indicate a ringing phone.
#define GNUNET_GNSRECORD_TYPE_PHONE
Endpoint for conversation.
Client -> Service message to call a phone.
Definition: conversation.h:215
struct GNUNET_HashCode line_port
Which phone line to call at the peer?
Definition: conversation.h:234
struct GNUNET_PeerIdentity target
Which peer is hosting the line?
Definition: conversation.h:229
uint32_t key_len
The identity key length.
Definition: conversation.h:239
struct GNUNET_GNS_LookupWithTldRequest * gns_lookup
Active GNS lookup (or NULL).
struct GNUNET_CONVERSATION_PhoneRecord phone_record
Target phone record, only valid after the lookup is done.
struct GNUNET_IDENTITY_Ego * caller_id
Our caller identity.
A phone record specifies which peer is hosting a given user and may also specify the phone line that ...
struct GNUNET_HashCode line_port
Phone line (CADET port) to connect to.
struct GNUNET_PeerIdentity peer
Identity of the peer hosting the phone service.
A private key for an identity as per LSD0001.
const void * data
Binary value stored in the DNS record.
size_t data_size
Number of bytes in data.

References call, GNUNET_CONVERSATION_Call::caller_id, CS_LOOKUP, CS_RINGING, GNUNET_GNSRECORD_Data::data, data_size, GNUNET_GNSRECORD_Data::data_size, GNUNET_CONVERSATION_Call::event_handler, GNUNET_CONVERSATION_Call::event_handler_cls, GNUNET_CONVERSATION_Call::gns_lookup, GNUNET_break, GNUNET_break_op, GNUNET_CONVERSATION_call_stop(), GNUNET_CONVERSATION_EC_CALL_GNS_FAIL, GNUNET_CONVERSATION_EC_CALL_RINGING, GNUNET_CRYPTO_private_key_get_length(), GNUNET_CRYPTO_write_private_key_to_buffer(), GNUNET_GNSRECORD_TYPE_PHONE, GNUNET_IDENTITY_ego_get_private_key(), GNUNET_memcpy, GNUNET_MESSAGE_TYPE_CONVERSATION_CS_PHONE_CALL, GNUNET_MQ_msg_extra, GNUNET_MQ_send(), ClientCallMessage::key_len, ClientCallMessage::line_port, GNUNET_CONVERSATION_PhoneRecord::line_port, GNUNET_CONVERSATION_Call::mq, GNUNET_CONVERSATION_PhoneRecord::peer, GNUNET_CONVERSATION_Call::phone_record, rd, rd_count, GNUNET_CONVERSATION_Call::state, and ClientCallMessage::target.

Referenced by GNUNET_CONVERSATION_call_start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ call_error_handler()

static void call_error_handler ( void *  cls,
enum GNUNET_MQ_Error  error 
)
static

We encountered an error talking with the conversation service.

Parameters
clsthe struct GNUNET_CONVERSATION_Call
errordetails about the error

Definition at line 508 of file conversation_api_call.c.

510{
511 struct GNUNET_CONVERSATION_Call *call = cls;
512
513 (void) error;
514 if (CS_SHUTDOWN == call->state)
515 {
517 return;
518 }
520 _ (
521 "Connection to conversation service lost, trying to reconnect\n"));
522 fail_call (call);
523}
#define GNUNET_log(kind,...)
@ GNUNET_ERROR_TYPE_WARNING
#define _(String)
GNU gettext support macro.
Definition: platform.h:178

References _, call, CS_SHUTDOWN, fail_call(), GNUNET_CONVERSATION_call_stop(), GNUNET_ERROR_TYPE_WARNING, GNUNET_log, and GNUNET_CONVERSATION_Call::state.

Referenced by GNUNET_CONVERSATION_call_start().

Here is the call graph for this function:
Here is the caller graph for this function: