use c99
[oweals/gnunet.git] / src / conversation / test_conversation_api_reject.c
index 78882c3bbb4c34aaf050fe278e2f416d04059293..5f1f836f703a74f1d242e6ca72f0f736ef5e4441 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     (C) 2013 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2013, 2014 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
@@ -14,8 +14,8 @@
 
      You should have received a copy of the GNU General Public License
      along with GNUnet; see the file COPYING.  If not, write to the
-     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-     Boston, MA 02111-1307, USA.
+     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+     Boston, MA 02110-1301, USA.
 */
 /**
  * @file conversation/test_conversation_api_reject.c
@@ -130,10 +130,9 @@ static struct GNUNET_MICROPHONE_Handle call_mic = {
  * Signature of the main function of a task.
  *
  * @param cls closure
- * @param tc context information (why was this task triggered now)
  */
 static void
-end_test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+end_test (void *cls)
 {
   GNUNET_SCHEDULER_shutdown ();
   if (NULL != op)
@@ -174,13 +173,11 @@ static void
 phone_event_handler (void *cls,
                      enum GNUNET_CONVERSATION_PhoneEventCode code,
                      struct GNUNET_CONVERSATION_Caller *caller,
-                     const char *caller_id)
+                     const struct GNUNET_CRYPTO_EcdsaPublicKey *caller_id)
 {
   static enum GNUNET_CONVERSATION_PhoneEventCode expect
     = GNUNET_CONVERSATION_EC_PHONE_RING;
 
-  GNUNET_break (0 == strcmp (caller_id,
-                             gns_caller_id));
   GNUNET_break (code == expect);
   switch (code)
   {
@@ -217,6 +214,7 @@ call_event_handler (void *cls,
   case GNUNET_CONVERSATION_EC_CALL_GNS_FAIL:
   case GNUNET_CONVERSATION_EC_CALL_SUSPENDED:
   case GNUNET_CONVERSATION_EC_CALL_RESUMED:
+  case GNUNET_CONVERSATION_EC_CALL_ERROR:
     fprintf (stderr, "Unexpected call code: %d\n", code);
     break;
   }
@@ -241,7 +239,8 @@ namestore_put_cont (void *cls,
   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);
 }
 
 
@@ -290,6 +289,7 @@ identity_cb (void *cls,
                      "%s",
                      GNUNET_GNSRECORD_pkey_to_zkey (&pub));
     call = GNUNET_CONVERSATION_call_start (cfg,
+                                           ego,
                                            ego,
                                            gns_name,
                                            &call_speaker,