Changeset a4be2f6 for protocols/msn/ns.c


Ignore:
Timestamp:
2015-04-10T17:10:41Z (6 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
913a663
Parents:
3b09b38
git-author:
dequis <dx@…> (13-03-15 09:28:36)
git-committer:
dequis <dx@…> (10-04-15 17:10:41)
Message:

msn: add msn_queue_feed(), move read() out of msn_handler()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/ns.c

    r3b09b38 ra4be2f6  
    148148        struct msn_data *handler = data;
    149149        struct im_connection *ic = handler->ic;
    150 
    151         if (msn_handler(handler) == -1) {  /* Don't do this on ret == 0, it's already done then. */
     150        char bytes[1024];
     151        int st;
     152
     153        st = read(handler->fd, bytes, 1024);
     154        if (st <= 0) {
    152155                imcb_error(ic, "Error while reading from server");
    153156                imc_logout(ic, TRUE);
    154 
    155157                return FALSE;
    156         } else {
    157                 return TRUE;
    158         }
     158        }
     159
     160        msn_queue_feed(handler, bytes, st);
     161
     162        /* Ignore ret == 0, it's already disconnected then. */
     163        msn_handler(handler);
     164
     165        return TRUE;
     166       
    159167}
    160168
Note: See TracChangeset for help on using the changeset viewer.