Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add the ability to search for hashes.
[doldaconnect.git]
/
daemon
/
client.c
diff --git
a/daemon/client.c
b/daemon/client.c
index
bf7a3af
..
6f39327
100644
(file)
--- a/
daemon/client.c
+++ b/
daemon/client.c
@@
-201,6
+201,17
@@
wchar_t *unparsehash(struct hash *hash)
return(buf);
}
return(buf);
}
+int hashcmp(struct hash *h1, struct hash *h2)
+{
+ if(wcscmp(h1->algo, h2->algo))
+ return(0);
+ if(h1->len != h2->len)
+ return(0);
+ if(memcmp(h1->buf, h2->buf, h1->len))
+ return(0);
+ return(1);
+}
+
static struct hashcache *newhashcache(void)
{
struct hashcache *new;
static struct hashcache *newhashcache(void)
{
struct hashcache *new;