core: Clean up checksumming
Don't expose GChecksum in APIs. Add a new stream class which allows us to pass an input stream somewhere, but gather a checksum as it's read. Move some bits of the internals towards binary csums.
This commit is contained in:
1 parent
fa4cbc8b89
commit
f15c184584
17 files changed
+605
-274
No files matched your search
@@ -159,9 +159,9 @@ ot_util_variant_from_stream (GInputStream *src,
|
||||
|
||||
data_stream = (GMemoryOutputStream*)g_memory_output_stream_new (NULL, 0, g_realloc, g_free);
|
||||
|
||||
if (!g_output_stream_splice ((GOutputStream*)data_stream, src,
|
||||
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
|
||||
cancellable, error))
|
||||
if (g_output_stream_splice ((GOutputStream*)data_stream, src,
|
||||
G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET,
|
||||
cancellable, error) < 0)
|
||||
goto out;
|
||||
|
||||
ret_variant = g_variant_new_from_data (type, g_memory_output_stream_get_data (data_stream),
|
||||
|
||||
Reference in new issue
Block a user