[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Linphone-developers] strange (to me) code in console/commands.c
From: |
Jim Diamond |
Subject: |
[Linphone-developers] strange (to me) code in console/commands.c |
Date: |
Thu, 23 Jul 2009 15:59:27 -0300 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hi,
I just compiled 3.1.2.
The response to "status hook" using linphonec or linphonecsh is rather
bizarre: it always tells me "unregistered", but I am expecting
something like "connected" or "dialing" (or even the actual strings
from console/commands.c).
In the code I see
linphone_core_get_default_proxy(lc,&cfg);
.
.
.
else if (strstr(args,"hook"))
{
gstate_t
call_state=linphone_core_get_state(lc,GSTATE_GROUP_CALL);
if (!cfg || !linphone_proxy_config_is_registered(cfg)){
linphonec_out("unregistered\n");
return 1;
}
switch(call_state){
case GSTATE_CALL_OUT_INVITE:
linphonec_out("hook=dialing\n");
break;
Is there something I don't understand about The Right Way of doing
things? That is, why do I care about whether or not I have a proxy
just to see whether the phone is in use or not? And, even if I care,
is the answer "unregistered" a good response to the question "what is
the hook status"?
I commented out
if (!cfg || !linphone_proxy_config_is_registered(cfg)){
linphonec_out("unregistered\n");
return 1;
}
and things seem to work fine.
Can someone either explain to me why I want that code or confirm that
it shouldn't be there?
Thanks.
Jim
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Linphone-developers] strange (to me) code in console/commands.c,
Jim Diamond <=