On 10/23/06, Colin Whittaker <[EMAIL PROTECTED]> wrote:
>
>  Ok, I tried the patch,
>  Now I get a:
>  Event nua_r_authenticate, status 202, phrase No operation to restart
>
>  As the last event for this handle. 202 seems like is a strange status to
> get when there is failure.....

Well, it sort a kinda succeeds (it updates the username and password).
Perhaps a special error code could be in order.

--Pekka

>  Pekka Pessi wrote:
> On 10/19/06, Colin Whittaker <[EMAIL PROTECTED]> wrote:
>
> But my issue is I am not getting an error status for this handle, and
>  therefor don't clean it up.
>  Here is the trace:
>  I send nua_unsubscribe() on the handle with a successful subscription.
>  I then get:
>  nua_r_unsubscribe, status 100, phrase Request Authorized by Cache
>  nua_r_unsubscribe, status 100, phrase Request Authorized by Cache
>  nua_r_unsubscribe, status 100, phrase Request Authorized by Cache
>  nua_r_unsubscribe, status 401, phrase Unauthorized
>  Then I send:
>  nua_authenticate() with the same info as the original.
>  and I never get any more events for that handle. This leads to handle
>  leaking.
>
>
> Shouldn't there be some kind of error instead of the 401 on the last
>  callback that indicates the authentication has failed ?
>
>  Hm. We do not send an event if nua_authentication fails. Something
>  like 900 Unauthorized?
>
>  You could try the attached patch, it should apply to 1.12.3.
>
>  ________________________________
>
> diff -rN -udp old-sofia-sip/libsofia-sip-ua/nua/nua_stack.c
> new-sofia-sip/libsofia-sip-ua/nua/nua_stack.c
> --- old-sofia-sip/libsofia-sip-ua/nua/nua_stack.c
> 2006-10-20 20:31:05.000000000 +0300
> +++ new-sofia-sip/libsofia-sip-ua/nua/nua_stack.c
> 2006-10-20 20:31:06.000000000 +0300
> @@ -260,7 +260,7 @@ int nua_stack_event(nua_t *nua, nua_hand
>  return event;
>  }
>
> - if ((event > nua_r_method && event <= nua_r_ack)
> + if ((event > nua_r_authenticate && event <= nua_r_ack)
>  || (nh && !nh->nh_valid)
>  || (nua->nua_shutdown && event != nua_r_shutdown)) {
>  if (msg)
> @@ -1605,21 +1605,26 @@ nua_stack_authenticate(nua_t *nua, nua_h
>  nua_client_request_t *cr;
>  nua_creq_restart_f *restart = NULL;
>
> - nua_stack_event(nua, nh, NULL, e, SIP_200_OK, TAG_END());
> -
>  cr = nua_client_request_restarting(nh->nh_cr);
>
>  if (cr)
>  restart = cr->cr_restart, cr->cr_restart = NULL;
>
> - if (restart)
> + if (restart) {
> + /* nua_stack_event(nua, nh, NULL, e, SIP_200_OK, TAG_END()); */
>  restart(nh, (tagi_t *)tags); /* Restart operation */
> + }
> + else {
> + nua_stack_event(nua, nh, NULL, e,
> + 202, "No operation to restart",
> + TAG_END());
> + }
>  }
>  else if (status < 0) {
> - nua_stack_event(nua, nh, NULL, e, 500, "Cannot add credentials",
> TAG_END());
> + nua_stack_event(nua, nh, NULL, e, 900, "Cannot add credentials",
> TAG_END());
>  }
>  else {
> - nua_stack_event(nua, nh, NULL, e, 404, "No matching challenge",
> TAG_END());
> + nua_stack_event(nua, nh, NULL, e, 904, "No matching challenge",
> TAG_END());
>  }
>  }
>
>
>
>  ________________________________
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>  ________________________________
>
> _______________________________________________
> Sofia-sip-devel mailing list
> Sofia-sip-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel
>
>


-- 
Pekka.Pessi mail at nokia.com

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to