Closed tengliu0929 closed 2 months ago
A few points:
g_mime_stream_flush(filteredstream);
- only call flush() on the output stream, never the input stream. I doubt it's doing any harm in your particular case, but it's bad practice.out_mem
, make sure to reset it using g_mime_stream_reset(out_mem);
Need help, I have tried decode base64 from a GMimeStream to a memory GMimeStream, the code snippet is below
I can't read any message from the out_mem stream, buf the bytearray shows the decoded message does exist. and I debug into the function stream_read, the error occur in here
bound_end = stream->bound_end != -1 ? stream->bound_end : (gint64) mem->buffer->len; n = (size_t) MIN (bound_end - stream->position, (gint64) len);
I print the out_mem using gdb,{parent_object = {g_type_instance = {g_class = 0x625790}, ref_count = 1, qdata = 0x0}, super_stream = 0x0, position = 351, bound_start = 0, bound_end = -1}
Does there is any bugs or I use the functions in the wrong way ? Besides, the gmime version is 2.6.23. Thanks a lot.