Skip to content

Commit

Permalink
quieten some exiting debug messages
Browse files Browse the repository at this point in the history
Rate limit · GitHub

Access has been restricted

You have triggered a rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

mikebrady committed Feb 16, 2019
1 parent fce6b51 commit 405a028
Showing 7 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions activity_monitor.c
Original file line number Diff line number Diff line change
@@ -265,9 +265,9 @@ void activity_monitor_start() {

void activity_monitor_stop() {
if (activity_monitor_running) {
debug(1, "activity_monitor_stop start...");
debug(3, "activity_monitor_stop start...");
pthread_cancel(activity_monitor_thread);
pthread_join(activity_monitor_thread, NULL);
debug(1, "activity_monitor_stop complete");
debug(2, "activity_monitor_stop complete");
}
}
4 changes: 2 additions & 2 deletions audio_alsa.c
Original file line number Diff line number Diff line change
@@ -1059,9 +1059,9 @@ static void deinit(void) {
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &oldState); // make this un-cancellable
// debug(2,"audio_alsa deinit called.");
stop();
debug(1, "Cancel buffer monitor thread.");
debug(2, "Cancel buffer monitor thread.");
pthread_cancel(alsa_buffer_monitor_thread);
debug(1, "Join buffer monitor thread.");
debug(3, "Join buffer monitor thread.");
pthread_join(alsa_buffer_monitor_thread, NULL);
pthread_setcancelstate(oldState, NULL);
}
4 changes: 2 additions & 2 deletions dacp.c
Original file line number Diff line number Diff line change
@@ -894,11 +894,11 @@ void dacp_monitor_start() {

void dacp_monitor_stop() {
if (dacp_monitor_initialised) { // only if it's been started and initialised
debug(1, "dacp_monitor_stop");
debug(2, "dacp_monitor_stop");
pthread_cancel(dacp_monitor_thread);
pthread_join(dacp_monitor_thread, NULL);
pthread_mutex_destroy(&dacp_server_information_lock);
debug(1, "DACP Conversation Lock Mutex Destroyed");
debug(3, "DACP Conversation Lock Mutex Destroyed");
pthread_mutex_destroy(&dacp_conversation_lock);
}
}
2 changes: 1 addition & 1 deletion dbus-service.c
Original file line number Diff line number Diff line change
@@ -885,7 +885,7 @@ int start_dbus_service() {
}

void stop_dbus_service() {
debug(1, "stopping dbus service");
debug(2, "stopping dbus service");
if (ownerID)
g_bus_unown_name(ownerID);
else
2 changes: 1 addition & 1 deletion metadata_hub.c
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ void metadata_hub_init(void) {

void metadata_hub_stop(void) {
if (metadata_hub_initialised) {
debug(1, "metadata_hub_stop.");
debug(2, "metadata_hub_stop.");
metadata_hub_release_track_artwork();
if (metadata_store.track_metadata) {
metadata_hub_release_track_metadata(metadata_store.track_metadata);
4 changes: 2 additions & 2 deletions rtsp.c
Original file line number Diff line number Diff line change
@@ -1411,7 +1411,7 @@ void metadata_process(uint32_t type, uint32_t code, char *data, uint32_t length)
}

void metadata_thread_cleanup_function(__attribute__((unused)) void *arg) {
debug(1, "metadata_thread_cleanup_function called");
debug(2, "metadata_thread_cleanup_function called");
metadata_delete_multicast_socket();
metadata_close();
pc_queue_delete(&metadata_queue);
@@ -1462,7 +1462,7 @@ void metadata_init(void) {

void metadata_stop(void) {
if (metadata_running) {
debug(1, "metadata_stop called.");
debug(2, "metadata_stop called.");
pthread_cancel(metadata_thread);
pthread_join(metadata_thread, NULL);
}
18 changes: 9 additions & 9 deletions shairport.c
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ static void sig_ignore(__attribute__((unused)) int foo, __attribute__((unused))
__attribute__((unused)) void *baz) {}
static void sig_shutdown(__attribute__((unused)) int foo, __attribute__((unused)) siginfo_t *bar,
__attribute__((unused)) void *baz) {
debug(1, "shutdown requested...");
debug(2, "shutdown requested...");
#ifdef CONFIG_LIBDAEMON
daemon_retval_send(255);
daemon_pid_file_remove();
@@ -1087,7 +1087,7 @@ pthread_t dbus_thread;
void *dbus_thread_func(__attribute__((unused)) void *arg) {
g_main_loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(g_main_loop);
debug(1, "g_main_loop thread exit");
debug(2, "g_main_loop thread exit");
pthread_exit(NULL);
}
#endif
@@ -1145,7 +1145,7 @@ const char *pid_file_proc(void) {

void main_cleanup_handler(__attribute__((unused)) void *arg) {
// it doesn't look like this is called when the main function is cancelled eith a pthread cancel.
debug(1, "main cleanup handler called.");
debug(2, "main cleanup handler called.");
#ifdef CONFIG_MQTT
if (config.mqtt_enabled) {
// terminate_mqtt();
@@ -1160,19 +1160,19 @@ void main_cleanup_handler(__attribute__((unused)) void *arg) {
stop_dbus_service();
#endif
if (g_main_loop) {
debug(1, "Stopping DBUS Loop Thread");
debug(2, "Stopping DBUS Loop Thread");
g_main_loop_quit(g_main_loop);
pthread_join(dbus_thread, NULL);
}
#endif

#ifdef CONFIG_DACP_CLIENT
debug(1, "Stopping DACP Monitor");
debug(2, "Stopping DACP Monitor");
dacp_monitor_stop();
#endif

#ifdef CONFIG_METADATA_HUB
debug(1, "Stopping metadata hub");
debug(2, "Stopping metadata hub");
metadata_hub_stop();
#endif

@@ -1183,20 +1183,20 @@ void main_cleanup_handler(__attribute__((unused)) void *arg) {
activity_monitor_stop(0);

if ((config.output) && (config.output->deinit)) {
debug(1, "Deinitialise the audio backend.");
debug(2, "Deinitialise the audio backend.");
config.output->deinit();
}
#ifdef CONFIG_LIBDAEMON
daemon_retval_send(0);
daemon_pid_file_remove();
daemon_signal_done();
#endif
debug(1, "Exit...");
debug(2, "Exit...");
exit(0);
}

void exit_function() {
debug(1, "exit function called...");
debug(2, "exit function called...");
main_cleanup_handler(NULL);
if (conns)
free(conns); // make sure the connections have been deleted first

0 comments on commit 405a028

Please sign in to comment.