Hello,
I took a look at your code and I noticed that (1) you call
su_root_run() several times and breaks it. su_root_run() is supposed to
be called only once and the loop should be broken (by calling
su_root_break()) only when you want to exit your app.
(2) You can call a request method inside the callback. Once you're
inside the callback, you must not worry about the event loop, because it
is already running (this is why your second call to su_root_run() won't
work). You should provide a different callback for a specific method or
provide some information through the magic pointer so that your app
keeps track of calls' states.
(3) Have you considered using NUA instead of NTA? There are a lot
of things that NUA will handle automatically that NTA won't. If you
really need NTA, authentication is nothing but, to respond to the
challenge with the correct hash. You may need to search for any library
to calculate the MD5 authorization digests or build your own.
<http://en.wikipedia.org/wiki/Digest_access_authentication>
Regards,
Paulo.
On 24/7/2010 02:21, Mayur Mahajan wrote:
Hi,
When I send a request to the server through my NTA client, I get
the response of the message(407 Unauthorized) in the callback. So,
when the callback function gets the 407 message it invokes
authorize_ua() method. The problem is I am not able to send the
request which authorizes me. Could you please help me in the
following things :-
1) Please see why I am not able to send an authorizing request
message "again"(authorize_ua() ). I am not at all getting any response.
In the authorize_ua func the su_root_run(context->c_root)
statement doesn't run.
2) Can I call a request method from inside of callback function
(using switch case)?
3) Lastly, .What is the alternative of nua_authenticate() in NTA ? I
couldn't find any function like nta_authenticate etc...
Please find the attachment.
Thank You,
Mayur
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://ad.doubleclick.net/clk;226879339;13503038;l?
http://clk.atdmt.com/CRS/go/247765532/direct/01/
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel