Hi Olle,

Thank you for your comments. We're about to merge a complete overhaul of the json and jsonrpc-c modules. The code is already available on GitHub at https://github.com/flowroute/. We have not, however, tested for IPv6. 

Matthew Williams
Flowroute LLC

On Sep 8, 2013, at 3:25 PM, "Olle E. Johansson" <oej@edvina.net> wrote:

int connect_server(struct jsonrpc_server *server)
{
       struct sockaddr_in  server_addr;
       struct hostent      *hp;

       server_addr.sin_family = AF_INET;
       server_addr.sin_port   = htons(server->port);


Hard coded IPv4 in a product that has supported IPv6 since over 10 years? Tss tss.

Also, the timouts are hardcoded.

Maybe we should try to use CURL, like the utils module do and standardise the way Kamailio connect to HTTP servers. Having one http client may be beneficial, an http_client module.

The idea with suspend and restart transactions in another route block that json_rpc uses seems like a good idea also for the HTTP client functions in utils.

Just some thoughts after looking into the code, a Sunday evening brainstorm :-)

/O
_______________________________________________
sr-dev mailing list
sr-dev@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev