Only report a client ip as metadata when a play session has started.
This commit is contained in:
@@ -295,6 +295,17 @@ void set_dacp_server_information(rtsp_conn_info *conn) { // tell the DACP conver
|
||||
metadata_hub_modify_prolog();
|
||||
int ch = metadata_store.dacp_server_active != dacp_server.scan_enable;
|
||||
metadata_store.dacp_server_active = dacp_server.scan_enable;
|
||||
|
||||
if ((metadata_store.client_ip == NULL) ||
|
||||
(strncmp(metadata_store.client_ip, conn->client_ip_string, INET6_ADDRSTRLEN) != 0)) {
|
||||
if (metadata_store.client_ip)
|
||||
free(metadata_store.client_ip);
|
||||
metadata_store.client_ip = strndup(conn->client_ip_string, INET6_ADDRSTRLEN);
|
||||
debug(1, "MH Client IP set to: \"%s\"", metadata_store.client_ip);
|
||||
metadata_store.client_ip_changed = 1;
|
||||
metadata_store.changed = 1;
|
||||
ch = 1;
|
||||
}
|
||||
metadata_hub_modify_epilog(ch);
|
||||
|
||||
pthread_cond_signal(&dacp_server_information_cv);
|
||||
|
||||
+3
-1
@@ -429,6 +429,7 @@ void metadata_hub_process_metadata(uint32_t type, uint32_t code, char *data, uin
|
||||
metadata_hub_modify_epilog(1);
|
||||
}
|
||||
break;
|
||||
/*
|
||||
case 'clip':
|
||||
if ((metadata_store.client_ip == NULL) ||
|
||||
(strncmp(metadata_store.client_ip, data, length) != 0)) {
|
||||
@@ -436,12 +437,13 @@ void metadata_hub_process_metadata(uint32_t type, uint32_t code, char *data, uin
|
||||
if (metadata_store.client_ip)
|
||||
free(metadata_store.client_ip);
|
||||
metadata_store.client_ip = strndup(data, length);
|
||||
// debug(1, "MH Client IP set to: \"%s\"", metadata_store.client_ip);
|
||||
debug(1, "MH Client IP set to: \"%s\"", metadata_store.client_ip);
|
||||
metadata_store.client_ip_changed = 1;
|
||||
metadata_store.changed = 1;
|
||||
metadata_hub_modify_epilog(1);
|
||||
}
|
||||
break;
|
||||
*/
|
||||
case 'svip':
|
||||
if ((metadata_store.server_ip == NULL) ||
|
||||
(strncmp(metadata_store.server_ip, data, length) != 0)) {
|
||||
|
||||
Reference in New Issue
Block a user