io_type inn = ig->type;
if ( inn != BUFCHAIN ) {
- i_fatal(0, "io_slurp: called on a source that is not from a bufchain\n");
+ dIMCTXio(ig);
+ im_fatal(aIMCTX, 0, "io_slurp: called on a source that is not from a bufchain\n");
}
ieb = ig->exdata;
rc = bufchain_read(ig, cc, ieb->length);
- if (rc != ieb->length)
- i_fatal(1, "io_slurp: bufchain_read returned an incomplete read: rc = %d, request was %d\n", rc, ieb->length);
+ if (rc != ieb->length) {
+ dIMCTXio(ig);
+ im_fatal(aIMCTX,1, "io_slurp: bufchain_read returned an incomplete read: rc = %d, request was %d\n", rc, ieb->length);
+ }
return rc;
}
ssize_t rc, wl = i_min(wrlen, BBSIZ);
im_log((aIMCTX, 1, "bufchain_seek: wrlen = %d, wl = %ld\n", wrlen, (long)wl));
rc = bufchain_write( ig, TB, wl );
- if (rc != wl) i_fatal(0, "bufchain_seek: Unable to extend file\n");
+ if (rc != wl) im_fatal(aIMCTX, 0, "bufchain_seek: Unable to extend file\n");
wrlen -= rc;
}
}