Ejemplo n.º 1
0
void
otrlib_poll(void)
{
    gdouble elapsed = g_timer_elapsed(timer, NULL);

    if (current_interval != 0 && elapsed > current_interval) {
        OtrlUserState user_state = otr_userstate();
        OtrlMessageAppOps *ops = otr_messageops();
        otrl_message_poll(user_state, ops, NULL);
        g_timer_start(timer);
    }
}
Ejemplo n.º 2
0
/*
 * Timer called from the glib main loop and set up by the timer_control
 * callback of libotr.
 */
static gboolean timer_fired_cb(gpointer data)
{
	otrl_message_poll(user_state_global->otr_state, &otr_ops, NULL);
	return TRUE;
}