mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:55:10 +00:00
[FIX] Fix subscription hash's warns
This commit is contained in:
parent
6e9ba8f0ee
commit
9b4d97b033
1 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@
|
|||
#include <string.h>
|
||||
|
||||
static char *
|
||||
SubscriptionHash(ParseeData *data, char *from, char *to)
|
||||
SubscriptionHash(char *from, char *to)
|
||||
{
|
||||
uint8_t *sum;
|
||||
char *hash;
|
||||
|
|
@ -22,7 +22,7 @@ SubscriptionHash(ParseeData *data, char *from, char *to)
|
|||
memcpy(&sum[0], from, strlen(from));
|
||||
memcpy(&sum[strlen(from) + 1], to, strlen(to));
|
||||
|
||||
hash = Base64Encode(sum, len);
|
||||
hash = Base64Encode((const char *) sum, len);
|
||||
Free(sum);
|
||||
|
||||
return hash;
|
||||
|
|
@ -54,7 +54,7 @@ AddPresenceSubscriber(ParseeData *data, char *from, char *to)
|
|||
}
|
||||
|
||||
database = data->db;
|
||||
hash = SubscriptionHash(data, from, to);
|
||||
hash = SubscriptionHash(from, to);
|
||||
ref = DbCreate(database, 2, "subs", hash);
|
||||
if (!ref)
|
||||
{
|
||||
|
|
@ -82,7 +82,7 @@ IsSubscribed(ParseeData *data, char *user, char *to)
|
|||
}
|
||||
|
||||
database = data->db;
|
||||
hash = SubscriptionHash(data, user, to);
|
||||
hash = SubscriptionHash(user, to);
|
||||
ret = DbExists(database, 2, "subs", hash);
|
||||
Free(hash);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue