if (ch->loop()) {
ch->loop()->add_idle_event(0, [](size_t, void* data) {
- channel* ch = (channel*)data;
- delete ch;
+ channel* c = (channel*)data;
+ delete c;
}, ch);
} else {
_D("Should not be here : channel[%p]", ch);
waiting_time = lock_acquired_time - lock_waiting_start_time;
pthread_mutex_lock(&m_history_mutex);
- _I("%s acquires lock after waiting %lluus, %s(%#p) was previously owned in %s",
+ _I("%s acquires lock after waiting %lluus, %s(%p) was previously owned in %s",
m_curent_info, waiting_time, expr, this, m_owner_info);
snprintf(m_owner_info, OWNER_INFO_LEN, "%s", m_curent_info);
pthread_mutex_unlock(&m_history_mutex);
delete m_socket;
m_socket = NULL;
}
- _D("Channel[%p] is disconnected");
+ _D("Channel[%p] is disconnected", this);
}
bool channel::send(std::shared_ptr<message> msg)
id->m_fn = fn;
id->m_data = data;
- g_source_set_callback(src, [](gpointer data) -> gboolean {
- idler_data *id = (idler_data *)data;
+ g_source_set_callback(src, [](gpointer gdata) -> gboolean {
+ idler_data *id = (idler_data *)gdata;
id->m_fn((size_t)id, id->m_data);
delete id;
return G_SOURCE_REMOVE;