uint64_t id;
int fd;
bool term;
+ bool ret;
+ event_loop *loop;
+ event_handler *handler;
unsigned int cond;
cond = (unsigned int)condition;
cond &= ~(G_IO_IN | G_IO_OUT);
handler_info *info = (handler_info *)data;
+ loop = info->loop;
+ handler = info->handler;
+ retvm_if(!loop || !handler, FALSE, "Invalid event info");
+
id = info->id;
fd = info->fd;
- term = info->loop->is_terminator(fd);
+ term = loop->is_terminator(fd);
if (cond & G_IO_NVAL)
return FALSE;
- bool ret = info->handler->handle(fd, (event_condition)cond);
+ ret = handler->handle(fd, (event_condition)cond);
if (!ret && !term) {
- info->loop->remove_event(id);
+ loop->remove_event(id);
return FALSE;
}
message::~message()
{
- if (m_msg && ref_cnt == 0) {
+ if (m_msg) {
delete [] m_msg;
m_msg = NULL;
}
{
ref_cnt--;
- if (ref_cnt > 0 || !m_msg)
+ /*if (ref_cnt > 0 || !m_msg)
return;
delete [] m_msg;
m_msg = NULL;
- delete this;
+ delete this;*/
}
int message::ref_count(void)