Hi Pekka,

I am sending you a fix on which reports that state:
nua_callstate_authenticating.

The nua_authenticate can be called in that state
(nua_callstate_authenticating), instead of being called in r_invite
(401 or 407).

Perhaps this will be useful to someone.

Paulo Pizarro

2010/8/11 Pekka Pessi <ppe...@gmail.com>:
> Hi Paolo,
>
>
> 2010/8/5 Paulo Pizarro <paulo.piza...@gmail.com>:
>> The "nua_callstate_authenticating" is documented:
>>
>> http://sofia-sip.sourceforge.net/refdocs/nua/nua__tag_8h.html#904045132b398207f1597320c860eca3
>>
>> But, it is not used on the source (only defined).
>>
>> Maybe, it's better to remove it from the enum or fix documentation with 
>> "TODO".
>
> It seems to me that it never has been used. I'll fix the documentation.
>
> --
> Pekka.Pessi mail at nokia.com
>
From e4147c131103c62ca6e1ae07c937e1eb2d44177d Mon Sep 17 00:00:00 2001
From: Paulo Pizarro <paulo.piza...@gmail.com>
Date: Wed, 11 Aug 2010 10:43:54 -0300
Subject: [PATCH] reporting call state change if waiting for authenticating (nua_callstate_authenticating)


Signed-off-by: Paulo Pizarro <paulo.piza...@gmail.com>
---
 libsofia-sip-ua/nua/nua_session.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/libsofia-sip-ua/nua/nua_session.c b/libsofia-sip-ua/nua/nua_session.c
index 5bf473c..7a2edc3 100644
--- a/libsofia-sip-ua/nua/nua_session.c
+++ b/libsofia-sip-ua/nua/nua_session.c
@@ -1035,9 +1035,15 @@ static int nua_invite_client_report(nua_client_request_t *cr,
 		  status, phrase,
 		  tags);
 
-  if (cr->cr_waiting)
+  if (cr->cr_waiting) {
+    if (cr->cr_wait_for_cred && ss) {
+        /* Report call state change only if waiting for authenticating */
+        signal_call_state_change(nh, ss, status, phrase, nua_callstate_authenticating);
+        return 1;
+    }
     /* Do not report call state change if waiting for restart */
     return 1;
+  }
 
   if (ss == NULL) {
     signal_call_state_change(nh, ss, status, phrase, nua_callstate_terminated);
-- 
1.7.0.4

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to