diff --git a/data.c b/data.c index e13bd2b..4782c2e 100644 --- a/data.c +++ b/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 */ { int ret = 0; diff --git a/main.c b/main.c index ab83086..b81f13c 100644 --- a/main.c +++ b/main.c @@ -13,11 +13,8 @@ int main(int argc, char *argv[]) srv_open("/home/angel/lib/snac/comam.es"); - snac_open(&snac, "mike"); + user_open(&snac, "mike"); 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; } diff --git a/snac.h b/snac.h index 1c56404..cef8cc3 100644 --- a/snac.h +++ b/snac.h @@ -26,8 +26,8 @@ typedef struct _snac { d_char *actor; /* actor url */ } snac; -int snac_open(snac *snac, char *uid); -void snac_free(snac *snac); +int user_open(snac *snac, char *uid); +void user_free(snac *snac); void snac_debug(snac *snac, int level, d_char *str); #define snac_log(snac, str) snac_debug(snac, 0, str)