]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
add sat_chksum_isfinished() check
authorMichael Schroeder <mls@suse.de>
Wed, 23 Mar 2011 14:53:18 +0000 (15:53 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 23 Mar 2011 14:53:18 +0000 (15:53 +0100)
src/chksum.c
src/chksum.h

index 7f28d16947f173270d8d4639301e1bd76c299dc8..a070a8636f4a119318391f8e3bd07cf30566bf5a 100644 (file)
@@ -127,6 +127,13 @@ sat_chksum_get_type(void *handle)
   return h->type;
 }
 
+int
+sat_chksum_isfinished(void *handle)
+{
+  struct ctxhandle *h = handle;
+  return h->done != 0;
+}
+
 const char *
 sat_chksum_type2str(Id type)
 {
index 06fa64cded89ed6900ec36673486701ca0da264e..948a01a610ed504db2978d4bb4802ee84ff42b43 100644 (file)
@@ -4,6 +4,7 @@ void *sat_chksum_create(Id type);
 void *sat_chksum_create_from_bin(Id type, const unsigned char *buf);
 void sat_chksum_add(void *handle, const void *data, int len);
 Id sat_chksum_get_type(void *handle);
+int sat_chksum_isfinished(void *handle);
 const unsigned char *sat_chksum_get(void *handle, int *lenp);
 void *sat_chksum_free(void *handle, unsigned char *cp);
 const char *sat_chksum_type2str(Id type);