--- ansh/src/proc.c 2012/07/22 22:41:33 1.4 +++ ansh/src/proc.c 2015/05/19 23:25:30 1.5 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ - * $Id: proc.c,v 1.4 2012/07/22 22:41:33 misho Exp $ + * $Id: proc.c,v 1.5 2015/05/19 23:25:30 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 @@ -49,13 +49,13 @@ SUCH DAMAGE. struct tagProc * -InitProc(int h, io_sockaddr_t *sa, u_short id, int len) +InitProc(int h, sockaddr_t *sa, u_short id, int len) { struct tagProc *proc; FTRACE(5); - proc = io_malloc(sizeof(struct tagProc)); + proc = e_malloc(sizeof(struct tagProc)); if (!proc) { ERR("Not enough memory #%d - %s", errno, strerror(errno)); return NULL; @@ -64,18 +64,18 @@ InitProc(int h, io_sockaddr_t *sa, u_short id, int len proc->proc_sock = h; proc->proc_id = id; if (sa) - memcpy(&proc->proc_cli, sa, sizeof(io_sockaddr_t)); + memcpy(&proc->proc_cli, sa, sizeof(sockaddr_t)); proc->proc_blen = len; - proc->proc_buf_[0] = io_malloc(proc->proc_blen); + proc->proc_buf_[0] = e_malloc(proc->proc_blen); if (!proc->proc_buf_[0]) { - io_free(proc); + e_free(proc); proc = NULL; } - proc->proc_buf_[1] = io_malloc(proc->proc_blen); + proc->proc_buf_[1] = e_malloc(proc->proc_blen); if (!proc->proc_buf_[1]) { - io_free(proc->proc_buf_[0]); - io_free(proc); + e_free(proc->proc_buf_[0]); + e_free(proc); proc = NULL; } @@ -105,10 +105,10 @@ FreeProc(struct tagProc ** __restrict proc) return; if ((*proc)->proc_buf_[1]) - io_free((*proc)->proc_buf_[1]); + e_free((*proc)->proc_buf_[1]); if ((*proc)->proc_buf_[0]) - io_free((*proc)->proc_buf_[0]); - io_free(*proc); + e_free((*proc)->proc_buf_[0]); + e_free(*proc); *proc = NULL; }