Check if ip_address string is non-empty
parent
c22bdad624
commit
509b2c5ca5
|
@ -217,7 +217,7 @@ char* get_ip_address(netdata* data)
|
||||||
struct sockaddr_in *p_sa;
|
struct sockaddr_in *p_sa;
|
||||||
|
|
||||||
/* use cached value if possible and if the update count is non-zero */
|
/* use cached value if possible and if the update count is non-zero */
|
||||||
if (data->ip_address && data->ip_update_count > 0)
|
if (data->ip_address[0] && data->ip_update_count > 0)
|
||||||
{
|
{
|
||||||
data->ip_update_count--;
|
data->ip_update_count--;
|
||||||
return data->ip_address;
|
return data->ip_address;
|
||||||
|
|
Loading…
Reference in New Issue