[sr-dev] json-rpc connect IPv4 only?
Olle E. Johansson
oej at edvina.net
Sun Sep 8 21:25:35 CEST 2013
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
More information about the sr-dev
mailing list