--- libaitcfg/src/pq.c 2013/01/17 13:27:39 1.3 +++ libaitcfg/src/pq.c 2013/05/26 20:11:53 1.3.2.2 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: pq.c,v 1.3 2013/01/17 13:27:39 misho Exp $ +* $Id: pq.c,v 1.3.2.2 2013/05/26 20:11:53 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Copyright 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ _selectPasswd(pwd_root_t * __restrict pwd, u_int uid, memset(&fu, 0, sizeof fu); if (csName) { - io_setlikeVar(&fu.usr_name, string, strlen(csName) + 1, csName); + ait_setlikeVar(&fu.usr_name, string, strlen(csName) + 1, csName); return RB_FIND(tagPWD, pwd, &fu); } @@ -103,7 +103,7 @@ cfg_findPasswdBy(pwd_root_t * __restrict pwd, int crit SLIST_FOREACH(u, pwd, usr_next) switch (criteria) { case PWD_CRIT_NAME: - if (!io_cmpVar(&u->usr_name, &v)) { + if (!ait_cmpVar(&u->usr_name, &v)) { AIT_FREE_VAL(&v); return u; } @@ -187,7 +187,7 @@ cfg_unsetPasswd(pwd_root_t * __restrict pwd, int crite AIT_FREE_VAL(&u->usr_realm); AIT_FREE_VAL(&u->usr_home); AIT_FREE_VAL(&u->usr_shell); - io_free(u); + e_free(u); return 1; } @@ -221,9 +221,9 @@ cfg_setPasswd(pwd_root_t * __restrict pwd, passwd_attr u = _selectPasswd(pwd, 0, csName); if (!u) { /* adding new element */ - u = io_malloc(sizeof(struct tagUser)); + u = e_malloc(sizeof(struct tagUser)); if (!u) { - cfg_SetErr(io_GetErrno(), "%s", io_GetError()); + cfg_SetErr(elwix_GetErrno(), "%s", elwix_GetError()); return -1; } else { memset(u, 0, sizeof(struct tagUser)); @@ -274,7 +274,7 @@ cfg_setPasswd(pwd_root_t * __restrict pwd, passwd_attr va_end(lst); AIT_KEY(&u->usr_name) = crcFletcher16(AIT_GET_LIKE(&u->usr_name, u_short*), - io_align(AIT_LEN(&u->usr_name) - 1, 2) / 2); + E_ALIGN(AIT_LEN(&u->usr_name) - 1, 2) / 2); PWD_LOCK(pwd); RB_INSERT(tagPWD, pwd, u); @@ -339,7 +339,7 @@ cfg_setPasswd(pwd_root_t * __restrict pwd, passwd_attr * @arg1 = Username | UID * return: NULL item not found, !=NULL structure found */ -inline const struct tagUser * +const struct tagUser * cfg_getPasswd(pwd_root_t * __restrict pwd, int criteria, ...) { struct tagUser *u;