aboutsummaryrefslogtreecommitdiff
path: root/src/conversation/gnunet-conversation-gtk_phone.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conversation/gnunet-conversation-gtk_phone.c')
-rw-r--r--src/conversation/gnunet-conversation-gtk_phone.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/conversation/gnunet-conversation-gtk_phone.c b/src/conversation/gnunet-conversation-gtk_phone.c
index 7291fbf7..b6844a84 100644
--- a/src/conversation/gnunet-conversation-gtk_phone.c
+++ b/src/conversation/gnunet-conversation-gtk_phone.c
@@ -876,14 +876,25 @@ handle_reverse_lookup_result (void *cls,
876 struct IncomingCall *ic = cls; 876 struct IncomingCall *ic = cls;
877 877
878 ic->qe = NULL; 878 ic->qe = NULL;
879 if (NULL == label)
880 return;
881 GNUNET_free (ic->caller_id_str); 879 GNUNET_free (ic->caller_id_str);
882 ic->caller_id_str = GNUNET_strdup (label); 880 ic->caller_id_str = GNUNET_strdup (label);
883} 881}
884 882
885 883
886/** 884/**
885 * Failed to talk to namestore.
886 */
887static void
888handle_reverse_error (void *cls)
889{
890 struct IncomingCall *ic = cls;
891
892 ic->qe = NULL;
893 GCG_log (_("Error communicating with namestore!\n"));
894}
895
896
897/**
887 * Function called with an event emitted by a phone. 898 * Function called with an event emitted by a phone.
888 * 899 *
889 * @param cls closure 900 * @param cls closure
@@ -917,6 +928,8 @@ phone_event_handler (void *cls,
917 ic->qe = GNUNET_NAMESTORE_zone_to_name (GCG_IMPORT_get_namestore (), 928 ic->qe = GNUNET_NAMESTORE_zone_to_name (GCG_IMPORT_get_namestore (),
918 GNUNET_IDENTITY_ego_get_private_key (my_zone), 929 GNUNET_IDENTITY_ego_get_private_key (my_zone),
919 &ic->caller_id, 930 &ic->caller_id,
931 &handle_reverse_error,
932 ic,
920 &handle_reverse_lookup_result, 933 &handle_reverse_lookup_result,
921 ic); 934 ic);
922 ic->caller_num = caller_num_gen++; 935 ic->caller_num = caller_num_gen++;