quic_post_write(xso, actual_written > 0, actual_written == len, flags, 1);
+ /*
+ * Record however much data we wrote
+ */
+ *written = actual_written;
+
if (actual_written == len) {
/* Managed to append everything on the first try. */
- *written = actual_written;
return 1;
}
return QUIC_RAISE_NON_NORMAL_ERROR(ctx, args.err, NULL);
}
- *written = args.total_written;
+ /*
+ * When waiting on extra buffer space to be available, args.total_written
+ * holds the amount of remaining data we requested to write, which will be
+ * something less than the len parameter passed in, however much we wrote
+ * here, add it to the value that we wrote when we initially called
+ * xso_sstream_append
+ */
+ *written += args.total_written;
return 1;
}