Changeset e59eec0 for protocols/msn


Ignore:
Timestamp:
2015-04-10T17:10:41Z (10 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
002fede
Parents:
cd5fdcf
git-author:
dequis <dx@…> (19-03-15 16:02:31)
git-committer:
dequis <dx@…> (10-04-15 17:10:41)
Message:

msn: switch to long polling http

Location:
protocols/msn
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/gw.c

    rcd5fdcf re59eec0  
    7070
    7171        gw->waiting = FALSE;
     72        gw->polling = FALSE;
    7273
    7374        if (!gw->open) {
     
    110111                b_event_remove(gw->poll_timeout);
    111112        }
    112         gw->poll_timeout = b_timeout_add(5000, msn_gw_poll_timeout, gw);
     113        gw->poll_timeout = b_timeout_add(500, msn_gw_poll_timeout, gw);
    113114
    114115}
     
    125126                body = (char *) g_byte_array_free(gw->out, FALSE);
    126127                gw->out = g_byte_array_new();
     128        }
     129
     130        if (!bodylen && !args) {
     131                args = "Action=poll&Lifespan=60";
     132                gw->polling = TRUE;
    127133        }
    128134
     
    172178        if (!gw->open) {
    173179                msn_gw_open(gw);
    174         } else if (!gw->waiting) {
     180        } else if (gw->polling || !gw->waiting) {
    175181                msn_gw_dorequest(gw, NULL);
    176182        }
  • protocols/msn/msn.h

    rcd5fdcf re59eec0  
    141141        gboolean open;
    142142        gboolean waiting;
     143        gboolean polling;
    143144};
    144145
Note: See TracChangeset for help on using the changeset viewer.