From 33c2f5138f3b2e20b97d0fe8405aadb32dedf403 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sat, 8 Sep 2018 22:47:32 +0000 Subject: [PATCH] Always use the passed logger (from Messenger) in msi_kill. --- toxav/msi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toxav/msi.c b/toxav/msi.c index 42f5fc58..244225fa 100644 --- a/toxav/msi.c +++ b/toxav/msi.c @@ -145,7 +145,7 @@ int msi_kill(MSISession *session, const Logger *log) m_callback_msi_packet(session->messenger, nullptr, nullptr); if (pthread_mutex_trylock(session->mutex) != 0) { - LOGGER_ERROR(session->messenger->log, "Failed to acquire lock on msi mutex"); + LOGGER_ERROR(log, "Failed to acquire lock on msi mutex"); return -1; } @@ -166,7 +166,7 @@ int msi_kill(MSISession *session, const Logger *log) pthread_mutex_unlock(session->mutex); pthread_mutex_destroy(session->mutex); - LOGGER_DEBUG(session->messenger->log, "Terminated session: %p", (void *)session); + LOGGER_DEBUG(log, "Terminated session: %p", (void *)session); free(session); return 0; }