Changeset 22ec21d


Ignore:
Timestamp:
2013-08-02T11:52:22Z (11 years ago)
Author:
unknown <pesco@…>
Branches:
master
Children:
fa9478e
Parents:
6d9f0ba
Message:

regularly call otrl_message_poll

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    r6d9f0ba r22ec21d  
    150150void yes_forget_key(void *data);
    151151
     152/* timeout handler that calls otrl_message_poll */
     153gboolean ev_message_poll(gpointer data, gint fd, b_input_condition cond);
     154
    152155/* helper to make sure accountname and protocol match the incoming "opdata" */
    153156struct im_connection *check_imc(void *opdata, const char *accountname,
     
    241244        otr_ops.convert_msg = &op_convert_msg;
    242245        otr_ops.convert_free = &op_convert_free;
    243         otr_ops.timer_control = NULL;    // XXX call otrl_message_poll reg'ly
     246        otr_ops.timer_control = NULL;           /* we just poll */
    244247               
    245248        root_command_add( "otr", 1, cmd_otr, 0 );
     
    266269        s = set_add( &irc->b->set, "otr_does_html", "true", set_eval_bool, irc );
    267270       
     271        /* regularly call otrl_message_poll */
     272        gint definterval = otrl_message_poll_get_default_interval(irc->otr->us);
     273        b_timeout_add(definterval, ev_message_poll, irc->otr);
     274
    268275        return TRUE;
    269276}
     
    13461353}
    13471354
     1355/* timeout handler that calls otrl_message_poll */
     1356gboolean ev_message_poll(gpointer data, gint fd, b_input_condition cond)
     1357{
     1358        otr_t *otr = data;
     1359
     1360        otrl_message_poll(otr->us, &otr_ops, NULL);
     1361
     1362        return TRUE;    /* cycle timer */
     1363}
     1364
    13481365/* helper to assert that account and protocol names given to ops below always
    13491366   match the im_connection passed through as opdata */
Note: See TracChangeset for help on using the changeset viewer.