Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • logging.c

    rf271129 r7dcef03  
    177177    g_free(msg->message);
    178178    g_free(msg->filename);
    179     g_free(msg);
     179    g_slice_free(owl_log_entry, msg);
    180180  }
    181181}
     
    184184{
    185185  owl_log_entry *log_msg = NULL;
    186   log_msg = g_new(owl_log_entry,1);
     186  log_msg = g_slice_new(owl_log_entry);
    187187  log_msg->message = g_strdup(buffer);
    188188  log_msg->filename = g_strdup(filename);
     
    266266   * owl_log_shouldlog_message(void)
    267267   */
    268   m = g_new(owl_message, 1);
     268  m = g_slice_new(owl_message);
    269269  /* recip_index = 0 because there can only be one recipient anyway */
    270270  owl_message_create_from_zwrite(m, zw, text, 0);
     
    429429static gpointer owl_log_thread_func(gpointer data)
    430430{
    431   log_context = g_main_context_new();
    432431  log_loop = g_main_loop_new(log_context, FALSE);
    433432  g_main_loop_run(log_loop);
     
    437436void owl_log_init(void)
    438437{
     438  log_context = g_main_context_new();
     439#if GLIB_CHECK_VERSION(2, 31, 0)
     440  logging_thread = g_thread_new("logging",
     441                                owl_log_thread_func,
     442                                NULL);
     443#else
    439444  GError *error = NULL;
    440445  logging_thread = g_thread_create(owl_log_thread_func,
     
    448453    exit(1);
    449454  }
     455#endif
    450456 
    451457}
Note: See TracChangeset for help on using the changeset viewer.