diff options
author | Christian Grothoff <christian@grothoff.org> | 2014-06-06 08:57:09 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2014-06-06 08:57:09 +0000 |
commit | a0ce326e5d3ad4275cff23de7a7916e492e54a33 (patch) | |
tree | 5f924d09b19d57de08988564d3e1aabb6b36674d /src/conversation | |
parent | aece72e29b041e2dfbc5b49d2fd0d49f8ab2124e (diff) | |
download | gnunet-a0ce326e5d3ad4275cff23de7a7916e492e54a33.tar.gz gnunet-a0ce326e5d3ad4275cff23de7a7916e492e54a33.zip |
-allow caller ID to differ from zone used for resolution
Diffstat (limited to 'src/conversation')
-rw-r--r-- | src/conversation/conversation_api.c | 2 | ||||
-rw-r--r-- | src/conversation/conversation_api_call.c | 10 | ||||
-rw-r--r-- | src/conversation/gnunet-conversation.c | 1 | ||||
-rw-r--r-- | src/conversation/test_conversation_api.c | 1 | ||||
-rw-r--r-- | src/conversation/test_conversation_api_reject.c | 1 | ||||
-rw-r--r-- | src/conversation/test_conversation_api_twocalls.c | 2 |
6 files changed, 15 insertions, 2 deletions
diff --git a/src/conversation/conversation_api.c b/src/conversation/conversation_api.c index bc6d0f460..da193ad5f 100644 --- a/src/conversation/conversation_api.c +++ b/src/conversation/conversation_api.c | |||
@@ -289,7 +289,7 @@ handle_phone_ring (void *cls, | |||
289 | /** | 289 | /** |
290 | * We received a `struct ClientPhoneHangupMessage`. | 290 | * We received a `struct ClientPhoneHangupMessage`. |
291 | * | 291 | * |
292 | * @param cls the `struct GNUNET_CONVERSATION_Phone` | 292 | * @param cls the `struct GNUNET_CONVERSATION_Phone *` |
293 | * @param msg the message | 293 | * @param msg the message |
294 | */ | 294 | */ |
295 | static void | 295 | static void |
diff --git a/src/conversation/conversation_api_call.c b/src/conversation/conversation_api_call.c index f69a6518c..1b51ad397 100644 --- a/src/conversation/conversation_api_call.c +++ b/src/conversation/conversation_api_call.c | |||
@@ -96,6 +96,11 @@ struct GNUNET_CONVERSATION_Call | |||
96 | struct GNUNET_IDENTITY_Ego *caller_id; | 96 | struct GNUNET_IDENTITY_Ego *caller_id; |
97 | 97 | ||
98 | /** | 98 | /** |
99 | * GNS zone to use to resolve @e callee. | ||
100 | */ | ||
101 | struct GNUNET_IDENTITY_Ego *zone_id; | ||
102 | |||
103 | /** | ||
99 | * Target callee as a GNS address/name. | 104 | * Target callee as a GNS address/name. |
100 | */ | 105 | */ |
101 | char *callee; | 106 | char *callee; |
@@ -530,7 +535,7 @@ reconnect_call (struct GNUNET_CONVERSATION_Call *call) | |||
530 | &call_error_handler, | 535 | &call_error_handler, |
531 | call); | 536 | call); |
532 | call->state = CS_LOOKUP; | 537 | call->state = CS_LOOKUP; |
533 | GNUNET_IDENTITY_ego_get_public_key (call->caller_id, | 538 | GNUNET_IDENTITY_ego_get_public_key (call->zone_id, |
534 | &my_zone); | 539 | &my_zone); |
535 | call->gns_lookup = GNUNET_GNS_lookup (call->gns, | 540 | call->gns_lookup = GNUNET_GNS_lookup (call->gns, |
536 | call->callee, | 541 | call->callee, |
@@ -548,6 +553,7 @@ reconnect_call (struct GNUNET_CONVERSATION_Call *call) | |||
548 | * | 553 | * |
549 | * @param cfg configuration to use, specifies our phone service | 554 | * @param cfg configuration to use, specifies our phone service |
550 | * @param caller_id identity of the caller | 555 | * @param caller_id identity of the caller |
556 | * @param zone_id GNS zone to use to resolve @a callee | ||
551 | * @param callee GNS name of the callee (used to locate the callee's record) | 557 | * @param callee GNS name of the callee (used to locate the callee's record) |
552 | * @param speaker speaker to use (will be used automatically immediately once the | 558 | * @param speaker speaker to use (will be used automatically immediately once the |
553 | * #GNUNET_CONVERSATION_EC_CALL_PICKED_UP event is generated); we will NOT generate | 559 | * #GNUNET_CONVERSATION_EC_CALL_PICKED_UP event is generated); we will NOT generate |
@@ -560,6 +566,7 @@ reconnect_call (struct GNUNET_CONVERSATION_Call *call) | |||
560 | struct GNUNET_CONVERSATION_Call * | 566 | struct GNUNET_CONVERSATION_Call * |
561 | GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | 567 | GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, |
562 | struct GNUNET_IDENTITY_Ego *caller_id, | 568 | struct GNUNET_IDENTITY_Ego *caller_id, |
569 | struct GNUNET_IDENTITY_Ego *zone_id, | ||
563 | const char *callee, | 570 | const char *callee, |
564 | struct GNUNET_SPEAKER_Handle *speaker, | 571 | struct GNUNET_SPEAKER_Handle *speaker, |
565 | struct GNUNET_MICROPHONE_Handle *mic, | 572 | struct GNUNET_MICROPHONE_Handle *mic, |
@@ -571,6 +578,7 @@ GNUNET_CONVERSATION_call_start (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
571 | call = GNUNET_new (struct GNUNET_CONVERSATION_Call); | 578 | call = GNUNET_new (struct GNUNET_CONVERSATION_Call); |
572 | call->cfg = cfg; | 579 | call->cfg = cfg; |
573 | call->caller_id = caller_id; | 580 | call->caller_id = caller_id; |
581 | call->zone_id = zone_id; | ||
574 | call->callee = GNUNET_strdup (callee); | 582 | call->callee = GNUNET_strdup (callee); |
575 | call->speaker = speaker; | 583 | call->speaker = speaker; |
576 | call->mic = mic; | 584 | call->mic = mic; |
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c index 11cad533b..f846b6929 100644 --- a/src/conversation/gnunet-conversation.c +++ b/src/conversation/gnunet-conversation.c | |||
@@ -558,6 +558,7 @@ do_call (const char *arg) | |||
558 | GNUNET_assert (NULL == call); | 558 | GNUNET_assert (NULL == call); |
559 | call = GNUNET_CONVERSATION_call_start (cfg, | 559 | call = GNUNET_CONVERSATION_call_start (cfg, |
560 | my_caller_id, | 560 | my_caller_id, |
561 | my_caller_id, | ||
561 | arg, | 562 | arg, |
562 | speaker, | 563 | speaker, |
563 | mic, | 564 | mic, |
diff --git a/src/conversation/test_conversation_api.c b/src/conversation/test_conversation_api.c index 862b71e6b..7a5537144 100644 --- a/src/conversation/test_conversation_api.c +++ b/src/conversation/test_conversation_api.c | |||
@@ -458,6 +458,7 @@ identity_cb (void *cls, | |||
458 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); | 458 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); |
459 | call = GNUNET_CONVERSATION_call_start (cfg, | 459 | call = GNUNET_CONVERSATION_call_start (cfg, |
460 | ego, | 460 | ego, |
461 | ego, | ||
461 | gns_name, | 462 | gns_name, |
462 | &call_speaker, | 463 | &call_speaker, |
463 | &call_mic, | 464 | &call_mic, |
diff --git a/src/conversation/test_conversation_api_reject.c b/src/conversation/test_conversation_api_reject.c index 8bfaabae9..3c91ce81b 100644 --- a/src/conversation/test_conversation_api_reject.c +++ b/src/conversation/test_conversation_api_reject.c | |||
@@ -291,6 +291,7 @@ identity_cb (void *cls, | |||
291 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); | 291 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); |
292 | call = GNUNET_CONVERSATION_call_start (cfg, | 292 | call = GNUNET_CONVERSATION_call_start (cfg, |
293 | ego, | 293 | ego, |
294 | ego, | ||
294 | gns_name, | 295 | gns_name, |
295 | &call_speaker, | 296 | &call_speaker, |
296 | &call_mic, | 297 | &call_mic, |
diff --git a/src/conversation/test_conversation_api_twocalls.c b/src/conversation/test_conversation_api_twocalls.c index 130edbc27..294092099 100644 --- a/src/conversation/test_conversation_api_twocalls.c +++ b/src/conversation/test_conversation_api_twocalls.c | |||
@@ -560,6 +560,7 @@ identity_cb (void *cls, | |||
560 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); | 560 | GNUNET_GNSRECORD_pkey_to_zkey (&pub)); |
561 | call1 = GNUNET_CONVERSATION_call_start (cfg, | 561 | call1 = GNUNET_CONVERSATION_call_start (cfg, |
562 | ego, | 562 | ego, |
563 | ego, | ||
563 | gns_name, | 564 | gns_name, |
564 | &call1_speaker, | 565 | &call1_speaker, |
565 | &call1_mic, | 566 | &call1_mic, |
@@ -567,6 +568,7 @@ identity_cb (void *cls, | |||
567 | (void *) "call1"); | 568 | (void *) "call1"); |
568 | call2 = GNUNET_CONVERSATION_call_start (cfg, | 569 | call2 = GNUNET_CONVERSATION_call_start (cfg, |
569 | ego, | 570 | ego, |
571 | ego, | ||
570 | gns_name, | 572 | gns_name, |
571 | &call2_speaker, | 573 | &call2_speaker, |
572 | &call2_mic, | 574 | &call2_mic, |