Changeset 4796


Ignore:
Timestamp:
Dec 16, 2011, 10:29:23 PM (8 years ago)
Author:
Pascal Terjan
Message:

Do not send the updated canvas if we failed sending the UPDATE command

File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/server.c

    r4366 r4796  
    137137            sprintf(buf2, "UPDATE %10d %10d", x, y);
    138138            ret = send_to_client(buf2, strlen(buf2) + 1, screen_list);
    139             if (ret < 29 && errno != EAGAIN)
     139            if (ret < 29)
    140140            {
    141141                free(buf);
    142142                return -1;
    143143            }
     144            /* Block to write the end of the message */
     145            fcntl(screen_list->comm.socket[SOCK_CLIENT], F_SETFL, 0);
    144146            while (towrite > 0)
    145147            {
    146148                ssize_t n;
    147149                debug("Wrote %d, %d remaining", written, towrite);
    148                 /* Block to write the end of the message */
    149                 fcntl(screen_list->comm.socket[SOCK_CLIENT], F_SETFL, 0);
    150150                n = send_to_client((char *)buf + written,
    151151                                   towrite > bufsize ? bufsize : towrite,
Note: See TracChangeset for help on using the changeset viewer.