@tamiel commented on this pull request.
In src/modules/websocket/websocket.c:
> + + if ((wsc = wsconn_get(msg->rcv.proto_reserved1)) == NULL) { + LM_ERR("$ws_real_src_ip cannot retrieve websocket connection\n"); + return pv_get_null(msg, param, res); + } + + wscid = wsc->id; + + if (wsc->real_src_ip[0] == 0) { + wsconn_put(wsc); + LM_DBG("$ws_real_src_ip ws_conid %d real_src_ip is not set\n", wscid); + return pv_get_null(msg, param, res); + } + + LM_DBG("$ws_real_src_ip ws_conid %d wsc->real_src_ip is %s (%d)\n", wscid, wsc->real_src_ip, (int)strlen(wsc->real_src_ip)); + len = snprintf(buff, IP_ADDR_MAX_STR_SIZE, "%s", wsc->real_src_ip);
Right strncpy should do the job here.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.