/*
This file is part of GNUnet.
- Copyright (C) 2013, 2014 GNUnet e.V.
+ Copyright (C) 2013, 2014, 2018 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
static unsigned int i;
char buf[32];
+ (void) cls;
GNUNET_assert (NULL != phone_rdc);
GNUNET_snprintf (buf, sizeof (buf), "phone-%u", i++);
phone_rdc (phone_rdc_cls, strlen (buf) + 1, buf);
static unsigned int i;
char buf[32];
+ (void) cls;
GNUNET_assert (NULL != call_rdc);
GNUNET_snprintf (buf, sizeof (buf), "call-%u", i++);
call_rdc (call_rdc_cls, strlen (buf) + 1, buf);
char buf[32];
if (0 == strcmp (origin, "phone"))
- GNUNET_snprintf (buf, sizeof (buf), "call-%u", call_i++);
+ GNUNET_snprintf (buf,
+ sizeof (buf),
+ "call-%u",
+ call_i++);
else
- GNUNET_snprintf (buf, sizeof (buf), "phone-%u", phone_i++);
+ GNUNET_snprintf (buf,
+ sizeof (buf),
+ "phone-%u",
+ phone_i++);
if ( (data_size != strlen (buf) + 1) ||
(0 != strncmp (buf, data, data_size)) )
{
static void
end_test (void *cls)
{
+ (void) cls;
GNUNET_SCHEDULER_shutdown ();
if (NULL != op)
{
caller_event_handler (void *cls,
enum GNUNET_CONVERSATION_CallerEventCode code)
{
+ (void) cls;
switch (code)
{
case GNUNET_CONVERSATION_EC_CALLER_SUSPEND:
static enum GNUNET_CONVERSATION_PhoneEventCode expect
= GNUNET_CONVERSATION_EC_PHONE_RING;
+ (void) cls;
+ (void) caller_id;
GNUNET_break (code == expect);
switch (code)
{
static enum GNUNET_CONVERSATION_CallEventCode expect
= GNUNET_CONVERSATION_EC_CALL_RINGING;
+ (void) cls;
GNUNET_break (code == expect);
switch (code)
{
caller_ego_create_cont (void *cls,
const char *emsg)
{
+ (void) cls;
op = NULL;
GNUNET_assert (NULL == emsg);
}
int32_t success,
const char *emsg)
{
+ (void) cls;
qe = NULL;
GNUNET_assert (GNUNET_YES == success);
GNUNET_assert (NULL == emsg);
GNUNET_assert (NULL == op);
- op = GNUNET_IDENTITY_create (id, "caller-ego", &caller_ego_create_cont, NULL);
+ op = GNUNET_IDENTITY_create (id,
+ "caller-ego",
+ &caller_ego_create_cont,
+ NULL);
}
struct GNUNET_GNSRECORD_Data rd;
struct GNUNET_CRYPTO_EcdsaPublicKey pub;
+ (void) cls;
+ (void) ctx;
if (NULL == name)
return;
if (NULL == ego)
"%s",
GNUNET_GNSRECORD_pkey_to_zkey (&pub));
call = GNUNET_CONVERSATION_call_start (cfg,
- ego,
ego,
gns_name,
&call_speaker,
phone_ego_create_cont (void *cls,
const char *emsg)
{
+ (void) cls;
op = NULL;
GNUNET_assert (NULL == emsg);
}
const struct GNUNET_CONFIGURATION_Handle *c,
struct GNUNET_TESTING_Peer *peer)
{
+ (void) cls;
+ (void) peer;
cfg = c;
- GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test,
+ GNUNET_SCHEDULER_add_delayed (TIMEOUT,
+ &end_test,
NULL);
id = GNUNET_IDENTITY_connect (cfg,
&identity_cb,
NULL);
- op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL);
+ op = GNUNET_IDENTITY_create (id,
+ "phone-ego",
+ &phone_ego_create_cont,
+ NULL);
ns = GNUNET_NAMESTORE_connect (cfg);
}
int
-main (int argc, char *argv[])
+main (int argc,
+ char *argv[])
{
+ (void) argc;
+ (void) argv;
if (0 != GNUNET_TESTING_peer_run ("test_conversation_api",
"test_conversation.conf",
- &run, NULL))
+ &run,
+ NULL))
return 1;
return ok;
}
/*
This file is part of GNUnet.
- Copyright (C) 2013, 2014 GNUnet e.V.
+ Copyright (C) 2013, 2014, 2018 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
static int
enable_speaker (void *cls)
{
+ (void) cls;
GNUNET_break (0);
return GNUNET_SYSERR;
}
static void
disable_speaker (void *cls)
{
+ (void) cls;
GNUNET_break (0);
}
size_t data_size,
const void *data)
{
+ (void) cls;
+ (void) data_size;
+ (void) data;
GNUNET_break (0);
}
static void
destroy_speaker (void *cls)
{
+ (void) cls;
}
GNUNET_MICROPHONE_RecordedDataCallback rdc,
void *rdc_cls)
{
+ (void) cls;
+ (void) rdc;
+ (void) rdc_cls;
GNUNET_break (0);
return GNUNET_SYSERR;
}
static void
disable_mic (void *cls)
{
+ (void) cls;
GNUNET_break (0);
}
static void
destroy_mic (void *cls)
{
+ (void) cls;
}
static void
end_test (void *cls)
{
+ (void) cls;
GNUNET_SCHEDULER_shutdown ();
if (NULL != op)
{
static enum GNUNET_CONVERSATION_PhoneEventCode expect
= GNUNET_CONVERSATION_EC_PHONE_RING;
+ (void) cls;
+ (void) caller_id;
GNUNET_break (code == expect);
switch (code)
{
static enum GNUNET_CONVERSATION_CallEventCode expect
= GNUNET_CONVERSATION_EC_CALL_RINGING;
+ (void) cls;
GNUNET_break (code == expect);
switch (code)
{
caller_ego_create_cont (void *cls,
const char *emsg)
{
+ (void) cls;
op = NULL;
GNUNET_assert (NULL == emsg);
}
int32_t success,
const char *emsg)
{
+ (void) cls;
qe = NULL;
GNUNET_assert (GNUNET_YES == success);
GNUNET_assert (NULL == emsg);
GNUNET_assert (NULL == op);
- op = GNUNET_IDENTITY_create (id, "caller-ego",
- &caller_ego_create_cont, NULL);
+ op = GNUNET_IDENTITY_create (id,
+ "caller-ego",
+ &caller_ego_create_cont,
+ NULL);
}
struct GNUNET_GNSRECORD_Data rd;
struct GNUNET_CRYPTO_EcdsaPublicKey pub;
+ (void) cls;
+ (void) ctx;
if (NULL == name)
return;
if (NULL == ego)
"%s",
GNUNET_GNSRECORD_pkey_to_zkey (&pub));
call = GNUNET_CONVERSATION_call_start (cfg,
- ego,
ego,
gns_name,
&call_speaker,
phone_ego_create_cont (void *cls,
const char *emsg)
{
+ (void) cls;
op = NULL;
GNUNET_assert (NULL == emsg);
}
const struct GNUNET_CONFIGURATION_Handle *c,
struct GNUNET_TESTING_Peer *peer)
{
+ (void) cls;
+ (void) peer;
cfg = c;
GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_test,
NULL);
id = GNUNET_IDENTITY_connect (cfg,
&identity_cb,
NULL);
- op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL);
+ op = GNUNET_IDENTITY_create (id,
+ "phone-ego",
+ &phone_ego_create_cont,
+ NULL);
ns = GNUNET_NAMESTORE_connect (cfg);
}
int
main (int argc, char *argv[])
{
+ (void) argc;
+ (void) argv;
if (0 != GNUNET_TESTING_peer_run ("test_conversation_api",
"test_conversation.conf",
&run, NULL))
/*
This file is part of GNUnet.
- Copyright (C) 2013 GNUnet e.V.
+ Copyright (C) 2013, 2018x GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
{
char buf[32];
+ (void) cls;
GNUNET_assert (NULL != phone_rdc);
GNUNET_snprintf (buf, sizeof (buf), "phone");
- phone_rdc (phone_rdc_cls, strlen (buf) + 1, buf);
+ phone_rdc (phone_rdc_cls,
+ strlen (buf) + 1,
+ buf);
phone_task = GNUNET_SCHEDULER_add_delayed (FREQ,
- &phone_send, NULL);
+ &phone_send,
+ NULL);
}
struct MicContext *mc = cls;
char buf[32];
+ (void) cls;
GNUNET_assert (NULL != mc->rdc);
- GNUNET_snprintf (buf, sizeof (buf), "call");
- mc->rdc (mc->rdc_cls, strlen (buf) + 1, buf);
+ GNUNET_snprintf (buf,
+ sizeof (buf),
+ "call");
+ mc->rdc (mc->rdc_cls,
+ strlen (buf) + 1,
+ buf);
mc->call_task = GNUNET_SCHEDULER_add_delayed (FREQ,
- &call_send, mc);
+ &call_send,
+ mc);
}
{
const char *origin = CLS_STR (cls);
+ (void) cls;
LOG_DEBUG ("Speaker %s enabled\n",
origin);
return GNUNET_OK;
{
const char *origin = CLS_STR (cls);
+ (void) cls;
LOG_DEBUG ("Speaker %s disabled\n",
origin);
}
static unsigned int phone_i;
static unsigned int call_i;
+ (void) cls;
if (0 == strncmp ("call", data, data_size))
call_i++;
else if (0 == strncmp ("phone", data, data_size))
static void
end_test (void *cls)
{
+ (void) cls;
timeout_task = NULL;
fprintf (stderr,
"Timeout!\n");
static void
do_shutdown (void *cls)
{
+ (void) cls;
if (NULL != timeout_task)
{
GNUNET_SCHEDULER_cancel (timeout_task);
caller_event_handler (void *cls,
enum GNUNET_CONVERSATION_CallerEventCode code)
{
+ (void) cls;
switch (code)
{
case GNUNET_CONVERSATION_EC_CALLER_SUSPEND:
case GNUNET_CONVERSATION_EC_CALLER_RESUME:
- LOG (GNUNET_ERROR_TYPE_WARNING, "Unexpected caller code: %d\n", code);
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Unexpected caller code: %d\n",
+ code);
break;
}
}
const struct GNUNET_CRYPTO_EcdsaPublicKey *caller_id)
{
const char *cid;
+ (void) cls;
+ (void) caller_id;
switch (code)
{
}
break;
default:
- LOG (GNUNET_ERROR_TYPE_WARNING, "Unexpected phone code: %d\n", code);
+ LOG (GNUNET_ERROR_TYPE_WARNING,
+ "Unexpected phone code: %d\n",
+ code);
break;
}
}
caller_ego_create_cont (void *cls,
const char *emsg)
{
+ (void) cls;
op = NULL;
GNUNET_assert (NULL == emsg);
}
int32_t success,
const char *emsg)
{
+ (void) cls;
qe = NULL;
GNUNET_assert (GNUNET_YES == success);
GNUNET_assert (NULL == emsg);
GNUNET_assert (NULL == op);
- op = GNUNET_IDENTITY_create (id, "caller-ego", &caller_ego_create_cont, NULL);
+ op = GNUNET_IDENTITY_create (id,
+ "caller-ego",
+ &caller_ego_create_cont,
+ NULL);
}
struct GNUNET_GNSRECORD_Data rd;
struct GNUNET_CRYPTO_EcdsaPublicKey pub;
+ (void) cls;
+ (void) ctx;
if (NULL == name)
return;
if (NULL == ego)
"%s",
GNUNET_GNSRECORD_pkey_to_zkey (&pub));
call1 = GNUNET_CONVERSATION_call_start (cfg,
- ego,
ego,
gns_name,
&call1_speaker,
&call_event_handler,
(void *) "call1");
call2 = GNUNET_CONVERSATION_call_start (cfg,
- ego,
ego,
gns_name,
&call2_speaker,
phone_ego_create_cont (void *cls,
const char *emsg)
{
+ (void) cls;
op = NULL;
GNUNET_assert (NULL == emsg);
}
const struct GNUNET_CONFIGURATION_Handle *c,
struct GNUNET_TESTING_Peer *peer)
{
+ (void) cls;
+ (void) peer;
cfg = c;
timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT,
&end_test,
id = GNUNET_IDENTITY_connect (cfg,
&identity_cb,
NULL);
- op = GNUNET_IDENTITY_create (id, "phone-ego", &phone_ego_create_cont, NULL);
+ op = GNUNET_IDENTITY_create (id,
+ "phone-ego",
+ &phone_ego_create_cont,
+ NULL);
ns = GNUNET_NAMESTORE_connect (cfg);
}
int
-main (int argc, char *argv[])
+main (int argc,
+ char *argv[])
{
-
+ (void) argc;
+ (void) argv;
if (0 != GNUNET_TESTING_peer_run ("test_conversation_api_twocalls",
"test_conversation.conf",
- &run, NULL))
+ &run,
+ NULL))
return 1;
if (call1_finished && call2_finished)
return 0;