Changeset c347a12 for otr.c


Ignore:
Timestamp:
2013-08-02T20:55:16Z (11 years ago)
Author:
unknown <pesco@…>
Branches:
master
Children:
fbcb481
Parents:
f93e01c
Message:

timer cleanup and "other instance" error message

File:
1 edited

Legend:

Unmodified
Added
Removed
  • otr.c

    rf93e01c rc347a12  
    271271        /* regularly call otrl_message_poll */
    272272        gint definterval = otrl_message_poll_get_default_interval(irc->otr->us);
    273         b_timeout_add(definterval, ev_message_poll, irc->otr);
     273        irc->otr->timer = b_timeout_add(definterval, ev_message_poll, irc->otr);
    274274
    275275        return TRUE;
     
    279279{
    280280        otr_t *otr = irc->otr;
     281        b_event_remove(otr->timer);
    281282        otrl_userstate_free(otr->us);
    282283        if(otr->keygen) {
     
    845846                display_otr_message(opdata, ctx,
    846847                        "unreadable encrypted message received");
     848                break;
     849        case OTRL_MSGEVENT_RCVDMSG_FOR_OTHER_INSTANCE:
     850                display_otr_message(opdata, ctx,
     851                        "OTR message for a different instance received");
    847852                break;
    848853        case OTRL_MSGEVENT_RCVDMSG_MALFORMED:
     
    13551360        otr_t *otr = data;
    13561361
    1357         otrl_message_poll(otr->us, &otr_ops, NULL);
     1362        if(otr && otr->us)
     1363                otrl_message_poll(otr->us, &otr_ops, NULL);
    13581364
    13591365        return TRUE;    /* cycle timer */
Note: See TracChangeset for help on using the changeset viewer.