[FIX] Fix subscription hash's warns

This commit is contained in:
LDA 2024-09-20 07:01:35 +02:00
commit 9b4d97b033

View file

@ -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);