diff --git a/client/src/request_handlers/get_msg.c b/client/src/request_handlers/get_msg.c index 0ed54b0..ebf0b6b 100644 --- a/client/src/request_handlers/get_msg.c +++ b/client/src/request_handlers/get_msg.c @@ -32,7 +32,6 @@ t_msg* handle_get_msg_response() { int error_code = get_response_code(json); if (error_code != R_SUCCESS) { - printf("not success -- %d\n", error_code); cJSON_Delete(json); logger(get_response_str(error_code), ERROR_LOG); return NULL; @@ -41,7 +40,6 @@ t_msg* handle_get_msg_response() { t_msg* new_msg = get_msg_from_json(msg_json); if (new_msg == NULL || new_msg->sender_id == utils->current_user->user_id) { - printf("not valid msg\n"); cJSON_Delete(json); logger(get_response_str(R_JSON_FAILURE), ERROR_LOG); return NULL; diff --git a/client/src/request_handlers/server_updates.c b/client/src/request_handlers/server_updates.c index a2a2c64..042e02a 100644 --- a/client/src/request_handlers/server_updates.c +++ b/client/src/request_handlers/server_updates.c @@ -90,11 +90,11 @@ void* handle_server_updates(void* arg) { (void)arg; while (1) { - if (utils && utils->is_suspended) - continue; - if (!utils) break; + + if (utils && utils->is_suspended) + continue; pthread_mutex_lock(&utils->lock); t_chat* curr_chat = utils->chatlist; diff --git a/utils/src/db_lists/chat_list.c b/utils/src/db_lists/chat_list.c index b1ec2ae..bec66b2 100644 --- a/utils/src/db_lists/chat_list.c +++ b/utils/src/db_lists/chat_list.c @@ -161,7 +161,7 @@ void mx_clear_chat_list(t_chat **list) { next = node->next; mx_clear_msg_list(&node->messages); - // mx_clear_msg_list(&node->last_new_msg); + mx_clear_msg_list(&node->new_messages); mx_clear_chat(&node); node = next; }