Changeset 1e34e40 for libfaim


Ignore:
Timestamp:
Nov 23, 2003, 6:34:09 PM (17 years ago)
Author:
Erik Nygren <nygren@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
c1be0c6
Parents:
c9e72d1
Message:
	Handle the case in aim_bstream_send where aim_send returns -1,
	        although there is likely an underlying problem here
		that would lead to this case.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libfaim/txqueue.c

    re374dee r1e34e40  
    217217{
    218218  int wrote = 0;
     219  int rv = 0;
    219220  if (!bs || !conn || (count < 0))
    220221    return -EINVAL;
     
    231232      aim_rxcallback_t userfunc;
    232233      while (count - wrote > 1024) {
    233         wrote = wrote + aim_send(conn->fd, bs->data + bs->offset + wrote, 1024);
     234        rv = aim_send(conn->fd, bs->data + bs->offset + wrote, 1024);
     235        if (rv < 0) {
     236          fprintf(stderr, "aim_bstream_send: aim_send failed...\n");
     237          return -EINVAL;
     238        }
     239        wrote = wrote + rv;
     240         
    234241        if ((userfunc=aim_callhandler(conn->sessv, conn,
    235242                                      AIM_CB_FAM_SPECIAL,
     
    240247    }
    241248    if (count - wrote) {
    242       wrote = wrote + aim_send(conn->fd, bs->data + bs->offset + wrote, count - wrote);
     249      rv = aim_send(conn->fd, bs->data + bs->offset + wrote, count - wrote);
     250      if (rv < 0) {
     251        fprintf(stderr, "aim_bstream_send: aim_send failed...\n");
     252        return -EINVAL;
     253      }
     254      wrote = wrote + rv;
    243255    }
    244256   
Note: See TracChangeset for help on using the changeset viewer.