Changeset 3676

Show
Ignore:
Timestamp:
05/20/08 18:43:01
Author:
jdapena
Message:

* libtinymail-camel/camel-lite/camel/camel-stream-filter.c:

(do_write): if the camel_stream_write call does not write the
full buffer but it's not due to an error, then loop to go on
writing the stream.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/modest/diablo-pe1/ChangeLog

    r3667 r3676  
     12008-05-20  Jose Dapena Paz  <jdapena@igalia.com> 
     2 
     3        * libtinymail-camel/camel-lite/camel/camel-stream-filter.c: 
     4        (do_write): if the camel_stream_write call does not write the 
     5        full buffer but it's not due to an error, then loop to go on 
     6        writing the stream. 
     7 
    182008-05-14  Jose Dapena Paz  <jdapena@igalia.com> 
    29 
  • releases/modest/diablo-pe1/libtinymail-camel/camel-lite/camel/camel-stream-filter.c

    r2950 r3676  
    291291        size_t presize, len, left = n; 
    292292        char *buffer, realbuffer[READ_SIZE+READ_PAD]; 
     293        size_t written = 0; 
    293294 
    294295        p->last_was_read = FALSE; 
     
    322323                } 
    323324 
    324                 if (camel_stream_write(filter->source, buffer, len) != len) 
    325                         return -1; 
     325                for (written = 0; written < len;) { 
     326                        size_t just_written; 
     327                        just_written = camel_stream_write (filter->source, buffer + written, len - written); 
     328                        if (just_written == -1) 
     329                                return -1; 
     330                        written += just_written; 
     331                } 
    326332        } 
    327333