[sr-dev] some pua_rpc progress

Juha Heinanen jh at tutpro.com
Wed Dec 3 02:32:11 CET 2014


i have made progress with pua_rpc module.  the remaining problem is that
rpc->fault does not produce proper fault document when its argument is
delayed_ctx.  in the publish() function below, rpc->fault calls work
fine up to the point when delayed ctx is created:

	dctx = rpc->delayed_ctx_new(c);

after that for example this piece of code

    if (ret == 418) {
        /*		rpc->add(c, "ds", 500, "Wrong ETag"); */
		rpc->fault(c, 500, "Wrong ETag");
		rpc->delayed_ctx_close(dctx);
	}

produces

HTTP/1.1 200 OK.
Via: SIP/2.0/TCP 127.0.0.1:52280.
Server: OpenXg SIP Proxy (4.3.0-0 (i386/linux)).
Content-Length: 108.
.
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value></value>
</param>
</params>

that is, failure response document is empty.  if i make the rpc->add call
instead, i get

HTTP/1.1 200 OK.
Via: SIP/2.0/TCP 127.0.0.1:52204.
Server: OpenXg SIP Proxy (4.3.0-0 (i386/linux)).
Content-Length: 151.
.
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value><int>500</int>
<string>Wrong ETag</string>
</value>
</param>
</params>
</methodResponse>

any ideas how to make rpc->fault to work on delayed ctx?

-- juha

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pua_rpc.c
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20141203/f1ec57f1/attachment-0001.c>


More information about the sr-dev mailing list