mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Renamed user functions.
This commit is contained in:
parent
8be433c9b6
commit
dd1a5ff147
3 changed files with 4 additions and 7 deletions
2
data.c
2
data.c
|
@ -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
5
main.c
|
@ -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
4
snac.h
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue