CID:1301065 fix possible NULL
This commit is contained in:
parent
47f88e920d
commit
55462887e8
|
@ -225,9 +225,11 @@ void *SWITCH_THREAD_FUNC rtmp_io_tcp_thread(switch_thread_t *thread, void *obj)
|
||||||
|
|
||||||
/* Get the remote address/port info */
|
/* Get the remote address/port info */
|
||||||
switch_socket_addr_get(&addr, SWITCH_TRUE, newsocket);
|
switch_socket_addr_get(&addr, SWITCH_TRUE, newsocket);
|
||||||
switch_get_addr(ipbuf, sizeof(ipbuf), addr);
|
if (addr) {
|
||||||
rsession->remote_address = switch_core_strdup(rsession->pool, ipbuf);
|
switch_get_addr(ipbuf, sizeof(ipbuf), addr);
|
||||||
rsession->remote_port = switch_sockaddr_get_port(addr);
|
rsession->remote_address = switch_core_strdup(rsession->pool, ipbuf);
|
||||||
|
rsession->remote_port = switch_sockaddr_get_port(addr);
|
||||||
|
}
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "Rtmp connection from %s:%i\n",
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(rsession->uuid), SWITCH_LOG_INFO, "Rtmp connection from %s:%i\n",
|
||||||
rsession->remote_address, rsession->remote_port);
|
rsession->remote_address, rsession->remote_port);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue