Renamed user functions.

This commit is contained in:
default 2022-09-19 23:03:18 +02:00
parent 8be433c9b6
commit dd1a5ff147
3 changed files with 4 additions and 7 deletions

2
data.c
View file

@ -72,7 +72,7 @@ void snac_free(snac *snac)
} }
int snac_open(snac *snac, char *uid) int user_open(snac *snac, char *uid)
/* opens a user */ /* opens a user */
{ {
int ret = 0; int ret = 0;

5
main.c
View file

@ -13,11 +13,8 @@ int main(int argc, char *argv[])
srv_open("/home/angel/lib/snac/comam.es"); srv_open("/home/angel/lib/snac/comam.es");
snac_open(&snac, "mike"); user_open(&snac, "mike");
snac_log(&snac, xs_str_new("ok")); snac_log(&snac, xs_str_new("ok"));
char *passwd = xs_dict_get(snac.config, "passwd");
printf("%d\n", check_password("mike", "1234", passwd));
return 0; return 0;
} }

4
snac.h
View file

@ -26,8 +26,8 @@ typedef struct _snac {
d_char *actor; /* actor url */ d_char *actor; /* actor url */
} snac; } snac;
int snac_open(snac *snac, char *uid); int user_open(snac *snac, char *uid);
void snac_free(snac *snac); void user_free(snac *snac);
void snac_debug(snac *snac, int level, d_char *str); void snac_debug(snac *snac, int level, d_char *str);
#define snac_log(snac, str) snac_debug(snac, 0, str) #define snac_log(snac, str) snac_debug(snac, 0, str)