summaryrefslogtreecommitdiff
path: root/src/conversation/test_conversation_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/test_conversation_api.c')
-rw-r--r--src/conversation/test_conversation_api.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c
index f8159115b..fd9327805 100644
--- a/src/conversation/test_conversation_api.c
+++ b/src/conversation/test_conversation_api.c
@@ -67,9 +67,9 @@ static GNUNET_MICROPHONE_RecordedDataCallback call_rdc;
static void *call_rdc_cls;
-static struct GNUNET_SCHEDULER_Task * phone_task;
+static struct GNUNET_SCHEDULER_Task *phone_task;
-static struct GNUNET_SCHEDULER_Task * call_task;
+static struct GNUNET_SCHEDULER_Task *call_task;
static void
@@ -347,11 +347,14 @@ phone_event_handler (void *cls,
case GNUNET_CONVERSATION_EC_PHONE_HUNG_UP:
GNUNET_break (caller == active_caller);
active_caller = NULL;
- ok = 0;
+ if (1 == ok)
+ ok = 0;
GNUNET_SCHEDULER_shutdown ();
break;
default:
- fprintf (stderr, "Unexpected phone code: %d\n", code);
+ fprintf (stderr,
+ "Unexpected phone code: %d\n",
+ code);
break;
}
}
@@ -376,12 +379,21 @@ call_event_handler (void *cls,
case GNUNET_CONVERSATION_EC_CALL_GNS_FAIL:
case GNUNET_CONVERSATION_EC_CALL_HUNG_UP:
call = NULL;
+ ok = 2;
+ GNUNET_break (0);
fprintf (stderr, "Unexpected call code: %d\n", code);
break;
case GNUNET_CONVERSATION_EC_CALL_SUSPENDED:
case GNUNET_CONVERSATION_EC_CALL_RESUMED:
+ GNUNET_break (0);
+ fprintf (stderr, "Unexpected call code: %d\n", code);
+ ok = 2;
+ break;
case GNUNET_CONVERSATION_EC_CALL_ERROR:
+ GNUNET_break (0);
fprintf (stderr, "Unexpected call code: %d\n", code);
+ call = NULL;
+ ok = 2;
break;
}
}