| 1 | /* |
| 2 | * AIDE (Advanced Intrusion Detection Environment) |
| 3 | * |
| 4 | * Copyright (C) 1999-2002,2022 Rami Lehti, Pablo Virolainen, |
| 5 | * Hannes von Haugwitz |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; either version 2 of the |
| 10 | * License, or (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | * General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | */ |
| 21 | |
| 22 | #include "db_list.h" |
| 23 | |
| 24 | void db_list_append(db_list*item) |
| 25 | { |
| 26 | db_list* tmp_listp=NULL; |
| 27 | item->next=NULL; |
| 28 | item->prev=NULL; |
| 29 | item->head=NULL; |
| 30 | |
| 31 | if(db_list_head==NULL){ |
| 32 | db_list_head=item; |
| 33 | db_list_head->next=NULL; |
| 34 | db_list_head->prev=NULL; |
| 35 | db_list_head->head=db_list_head; |
| 36 | db_list_head->tail=db_list_head; |
| 37 | return; |
| 38 | } |
| 39 | else { |
| 40 | tmp_listp=db_list_head->tail; |
| 41 | tmp_listp->next=item; |
| 42 | tmp_listp->tail=item; |
| 43 | item->head=db_list_head; |
| 44 | item->tail=db_list_head; |
| 45 | db_list_head->tail=item; |
| 46 | return; |
| 47 | } |
| 48 | } |
| 49 |