rtsp_conn_info *conn = (rtsp_conn_info *)arg;
debug(2, "Connection %d: AP2 Control Receiver Cleanup.", conn->connection_number);
close(conn->ap2_control_socket);
- debug(1, "Connection %d: UDP control port %u closed.", conn->connection_number, conn->local_ap2_control_port);
+ debug(2, "Connection %d: UDP control port %u closed.", conn->connection_number, conn->local_ap2_control_port);
conn->ap2_control_socket = 0;
conn->ap2_remote_control_socket_addr_length =
0; // indicates to the control receiver thread that the socket address need to be
void rtp_realtime_audio_cleanup_handler(__attribute__((unused)) void *arg) {
debug(2, "Realtime Audio Receiver Cleanup Start.");
- rtsp_conn_info *conn = (rtsp_conn_info *)arg;
+ rtsp_conn_info *conn = (rtsp_conn_info *)arg;
close(conn->realtime_audio_socket);
debug(1, "Connection %d: closing realtime audio port %u", conn->local_realtime_audio_port);
conn->realtime_audio_socket = 0;
debug(2, "Buffered Audio Receiver Cleanup Start.");
rtsp_conn_info *conn = (rtsp_conn_info *)arg;
close(conn->buffered_audio_socket);
- debug(1, "Connection %d: TCP Buffered Audio port closed: %u.", conn->connection_number, conn->local_buffered_audio_port);
+ debug(2, "Connection %d: TCP Buffered Audio port closed: %u.", conn->connection_number, conn->local_buffered_audio_port);
conn->buffered_audio_socket = 0;
debug(2, "Buffered Audio Receiver Cleanup Done.");
}
debug(3, "found RTSP connection thread %d in a non-running state.",
conns[i]->connection_number);
pthread_join(conns[i]->thread, &retval);
- debug(1, "Connection %d: deleted in cleanup.", conns[i]->connection_number);
+ debug(2, "Connection %d: deleted in cleanup.", conns[i]->connection_number);
free(conns[i]);
conns[i] = NULL;
}
// we are being asked to disconnect
// this can be called more than once on the same connection --
// by the player itself but also by the play seesion being killed
- debug(1, "Connection %d: TEARDOWN a %s connection.", conn->connection_number,
+ debug(2, "Connection %d: TEARDOWN a %s connection.", conn->connection_number,
get_category_string(conn->airplay_stream_category));
if (conn->rtp_event_thread) {
debug(2, "Connection %d: TEARDOWN Delete Event Thread.", conn->connection_number);
free(conn->rtp_event_thread);
conn->rtp_event_thread = NULL;
}
- debug(1, "Connection %d: TEARDOWN Close Event Socket.", conn->connection_number);
+ debug(2, "Connection %d: TEARDOWN Close Event Socket.", conn->connection_number);
if (conn->event_socket) {
close(conn->event_socket);
conn->event_socket = 0;
- debug(1, "Connection %d: closing TCP event port %u.", conn->connection_number, conn->local_event_port);
+ debug(2, "Connection %d: closing TCP event port %u.", conn->connection_number, conn->local_event_port);
}
// if we are closing a PTP stream only, do this
conn->groupContainsGroupLeader = 0;
config.airplay_statusflags &= (0xffffffff - (1 << 11)); // DeviceSupportsRelay
build_bonjour_strings(conn);
- debug(1, "Connection %d: TEARDOWN mdns_update on %s.", conn->connection_number,
+ debug(2, "Connection %d: TEARDOWN mdns_update on %s.", conn->connection_number,
get_category_string(conn->airplay_stream_category));
mdns_update(NULL, secondary_txt_records);
}
plist_t streams = plist_dict_get_item(messagePlist, "streams");
if (streams) {
- debug(1, "Connection %d: TEARDOWN a %s.", conn->connection_number,
+ debug(2, "Connection %d: TEARDOWN a %s.", conn->connection_number,
get_category_string(conn->airplay_stream_category));
// we are being asked to close a stream
teardown_phase_one(conn);
#endif
void metadata_init(void) {
- int ret;
if (config.metadata_enabled) {
// create the metadata pipe, if necessary
size_t pl = strlen(config.metadata_pipename) + 1;
(char *)errorstring, path);
}
free(path);
- int ret;
- ret = pthread_create(&metadata_thread, NULL, metadata_thread_function, NULL);
- if (ret)
+ if (pthread_create(&metadata_thread, NULL, metadata_thread_function, NULL) != 0)
debug(1, "Failed to create metadata thread!");
- ret =
- pthread_create(&metadata_multicast_thread, NULL, metadata_multicast_thread_function, NULL);
- if (ret)
+ if (pthread_create(&metadata_multicast_thread, NULL, metadata_multicast_thread_function, NULL) != 0)
debug(1, "Failed to create metadata multicast thread!");
}
#ifdef CONFIG_METADATA_HUB
- ret = pthread_create(&metadata_hub_thread, NULL, metadata_hub_thread_function, NULL);
- if (ret)
+ if (pthread_create(&metadata_hub_thread, NULL, metadata_hub_thread_function, NULL) != 0)
debug(1, "Failed to create metadata hub thread!");
#endif
#ifdef CONFIG_MQTT
- ret = pthread_create(&metadata_mqtt_thread, NULL, metadata_mqtt_thread_function, NULL);
- if (ret)
+ if (pthread_create(&metadata_mqtt_thread, NULL, metadata_mqtt_thread_function, NULL) != 0)
debug(1, "Failed to create metadata mqtt thread!");
#endif
metadata_running = 1;
int oldState;
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState);
- debug(1, "Connection %d: rtsp_conversation_thread_func_cleanup_function called.",
+ debug(2, "Connection %d: rtsp_conversation_thread_func_cleanup_function called.",
conn->connection_number);
#ifdef CONFIG_AIRPLAY_2
teardown_phase_one(conn);
close(conn->fd);
debug(3, "Connection %d terminating: closed fd %d.", conn->connection_number, conn->fd);
- debug(1, "Connection %d: terminating connection from %s:%u to self at %s:%u.",
+ debug(2, "Connection %d: terminating connection from %s:%u to self at %s:%u.",
conn->connection_number, conn->client_ip_string, conn->client_rtsp_port,
conn->self_ip_string, conn->self_rtsp_port);
}