if (flags == -1) {
// strerror_r(errno, (char
//*)errorstring, sizeof(errorstring));
- //debug(1, "create_log_file -- error %d (\"%s\") getting flags of pipe: \"%s\".",
+ // debug(1, "create_log_file -- error %d (\"%s\") getting flags of pipe: \"%s\".",
// errno,
// (char *)errorstring, pathname);
} else {
// if (flags == -1) {
// strerror_r(errno,
//(char *)errorstring, sizeof(errorstring));
- //debug(1, "create_log_file -- error %d
+ // debug(1, "create_log_file -- error %d
//(\"%s\") unsetting NONBLOCK of pipe: \"%s\".", errno,
//(char *)errorstring, pathname);
}
}
}
if (dacp_server.active_remote_id)
- free(dacp_server.active_remote_id);
- dacp_server.active_remote_id = strdup(conn->dacp_active_remote); // even if the dacp_id remains the same,
- // the active remote will change.
- debug(3, "set_dacp_server_information set active-remote id to %s.",
- dacp_server.active_remote_id);
+ free(dacp_server.active_remote_id);
+ dacp_server.active_remote_id =
+ strdup(conn->dacp_active_remote); // even if the dacp_id remains the same,
+ // the active remote will change.
+ debug(3, "set_dacp_server_information set active-remote id to %s.", dacp_server.active_remote_id);
pthread_cond_signal(&dacp_server_information_cv);
debug_mutex_unlock(&dacp_server_information_lock, 3);
}
"number %d.",
dacp_id, dacp_server.dacp_id, port);
if ((dacp_id == NULL) || (dacp_server.dacp_id == NULL)) {
- warn("dacp_id or dacp_server.dacp_id NULL detected");
+ warn("dacp_id or dacp_server.dacp_id NULL detected");
} else {
- if (strcmp(dacp_id, dacp_server.dacp_id) == 0) {
- dacp_server.port = port;
- if (port == 0)
- dacp_server.scan_enable = 0;
- else {
- dacp_server.scan_enable = 1;
- // debug(2, "dacp_monitor_port_update_callback enables scan");
- }
- // metadata_hub_modify_prolog();
- // int ch = metadata_store.dacp_server_active != dacp_server.scan_enable;
- // metadata_store.dacp_server_active = dacp_server.scan_enable;
- // metadata_hub_modify_epilog(ch);
- } else {
- debug(1, "dacp port monitor reporting on an out-of-use remote.");
- }
+ if (strcmp(dacp_id, dacp_server.dacp_id) == 0) {
+ dacp_server.port = port;
+ if (port == 0)
+ dacp_server.scan_enable = 0;
+ else {
+ dacp_server.scan_enable = 1;
+ // debug(2, "dacp_monitor_port_update_callback enables scan");
+ }
+ // metadata_hub_modify_prolog();
+ // int ch = metadata_store.dacp_server_active != dacp_server.scan_enable;
+ // metadata_store.dacp_server_active = dacp_server.scan_enable;
+ // metadata_hub_modify_epilog(ch);
+ } else {
+ debug(1, "dacp port monitor reporting on an out-of-use remote.");
+ }
}
pthread_cond_signal(&dacp_server_information_cv);
debug_mutex_unlock(&dacp_server_information_lock, 3);
pthread_cond_destroy(&dacp_server_information_cv);
debug(3, "DACP Server Information Condition Variable destroyed.");
if (dacp_server.active_remote_id) {
- free(dacp_server.active_remote_id);
- dacp_server.active_remote_id = NULL;
+ free(dacp_server.active_remote_id);
+ dacp_server.active_remote_id = NULL;
}
}
}
char *dacp_id; // id of the client -- used to find the port to be used
// uint16_t dacp_port; // port on the client to send remote control messages to, else
// zero
- char *dacp_active_remote; // key to send to the remote controller
- void *dapo_private_storage; // this is used for compatibility, if dacp stuff isn't enabled.
+ char *dacp_active_remote; // key to send to the remote controller
+ void *dapo_private_storage; // this is used for compatibility, if dacp stuff isn't enabled.
int enable_dither; // needed for filling silences before play actually starts
uint64_t dac_buffer_queue_minimum_length;
} else {
debug(2, "Connection %d: SETUP -- Note: no Active-Remote information the SETUP Record.",
conn->connection_number);
- if (conn->dacp_active_remote) {// this is in case SETUP was previously called
+ if (conn->dacp_active_remote) { // this is in case SETUP was previously called
free(conn->dacp_active_remote);
conn->dacp_active_remote = NULL;
}
} else {
debug(2, "Connection %d: SETUP doesn't include DACP-ID string information.",
conn->connection_number);
- if (conn->dacp_id) {// this is in case SETUP was previously called
+ if (conn->dacp_id) { // this is in case SETUP was previously called
free(conn->dacp_id);
- conn->dacp_id = NULL;
+ conn->dacp_id = NULL;
}
}