/*
This file is part of GNUnet.
- (C) 2013 Christian Grothoff (and other contributing authors)
+ Copyright (C) 2013 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
};
-
/**
* List of incoming calls
*/
/**
* Caller handle (for active incoming call).
+ * This call handler is NOT in the #cl_head / #cl_tail list.
*/
static struct CallList *cl_active;
{
case GNUNET_CONVERSATION_EC_PHONE_RING:
FPRINTF (stdout,
- _("Incoming call from `%s'. Please /accept #%u or /cancel %u the call.\n"),
+ _("Incoming call from `%s'. Please /accept %u or /cancel %u the call.\n"),
GNUNET_GNSRECORD_pkey_to_zkey (caller_id),
caller_num_gen,
caller_num_gen);
for (cl = cl_head; NULL != cl; cl = cl->next)
if (caller == cl->caller)
break;
+ if ( (NULL == cl) &&
+ (caller == cl_active->caller) )
+ cl = cl_active;
if (NULL == cl)
{
GNUNET_break (0);
FPRINTF (stdout,
_("Call from `%s' terminated\n"),
GNUNET_GNSRECORD_pkey_to_zkey (&cl->caller_id));
- GNUNET_CONTAINER_DLL_remove (cl_head,
- cl_tail,
- cl);
if (cl == cl_active)
{
cl_active = NULL;
phone_state = PS_LISTEN;
}
+ else
+ {
+ GNUNET_CONTAINER_DLL_remove (cl_head,
+ cl_tail,
+ cl);
+ }
GNUNET_free (cl);
break;
}
case GNUNET_CONVERSATION_EC_CALL_ERROR:
FPRINTF (stdout,
_("Error with the call, restarting it\n"));
- call_state = CS_RESOLVING;
- // FIXME: is this correct?
+ GNUNET_free (peer_name);
+ peer_name = NULL;
+ call = NULL;
break;
}
}