null+****@clear*****
null+****@clear*****
2012年 4月 26日 (木) 23:40:07 JST
Kouhei Sutou 2012-04-26 23:40:07 +0900 (Thu, 26 Apr 2012) New Revision: 6db53e35732b701f032b2c4d22af10eca4f9f850 Log: Clear logger after grn_fin() to enable log in grn_fin() Modified files: ha_mroonga.cpp Modified: ha_mroonga.cpp (+4 -4) =================================================================== --- ha_mroonga.cpp 2012-04-26 23:39:57 +0900 (5cf97d4) +++ ha_mroonga.cpp 2012-04-26 23:40:07 +0900 (20380be) @@ -1396,7 +1396,6 @@ static int mrn_deinit(void *p) pthread_mutex_destroy(&mrn_open_tables_mutex); my_hash_free(&mrn_allocated_thds); pthread_mutex_destroy(&mrn_allocated_thds_mutex); - pthread_mutex_destroy(&mrn_log_mutex); pthread_mutex_destroy(&mrn_db_mutex); GRN_HASH_EACH(ctx, mrn_hash, id, NULL, 0, &value, { grn_obj *db; @@ -1406,13 +1405,14 @@ static int mrn_deinit(void *p) grn_hash_close(ctx, mrn_hash); grn_obj_unlink(ctx, mrn_db); + grn_ctx_fin(ctx); + grn_fin(); + if (mrn_log_file_opened) { fclose(mrn_log_file); mrn_log_file_opened = false; } - - grn_ctx_fin(ctx); - grn_fin(); + pthread_mutex_destroy(&mrn_log_mutex); return 0; }