fix stack overflow with linphonec without readline, asking for password

This commit is contained in:
Simon Morlat 2011-04-22 21:05:08 +02:00
parent 9fe0c5b8d2
commit 6cf6ce675d

View file

@ -794,11 +794,17 @@ linphonec_finish(int exit_status)
int
linphonec_prompt_for_auth_final(LinphoneCore *lc)
{
static int reentrancy=0;
char *input, *iptr;
char auth_prompt[256];
#ifdef HAVE_READLINE
rl_hook_func_t *old_event_hook;
#endif
if (reentrancy!=0) return 0;
reentrancy++;
LinphoneAuthInfo *pending_auth=auth_stack.elem[auth_stack.nitems-1];
snprintf(auth_prompt, 256, "Password for %s on %s: ",