Browse code

core, lib, modules: updated include paths for header files

Daniel-Constantin Mierla authored on 07/12/2016 11:07:22
Showing 1 changed files
... ...
@@ -28,7 +28,7 @@
28 28
 #ifndef HSLOT_H
29 29
 #define HSLOT_H
30 30
 
31
-#include "../../locking.h"
31
+#include "../../core/locking.h"
32 32
 
33 33
 #include "udomain.h"
34 34
 #include "urecord.h"
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
1
+/*
2
+ * Copyright (C) 2001-2003 FhG Fokus
3
+ *
4
+ * This file is part of Kamailio, a free SIP server.
5
+ *
6
+ * Kamailio is free software; you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation; either version 2 of the License, or
9
+ * (at your option) any later version
10
+ *
11
+ * Kamailio is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program; if not, write to the Free Software
18
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
19
+ */
20
+
21
+/*! \file
22
+ *  \brief USRLOC - Hash table collision slot related functions
23
+ *  \ingroup usrloc
24
+ */
25
+
26
+
27
+
28
+#ifndef HSLOT_H
29
+#define HSLOT_H
30
+
31
+#include "../../locking.h"
32
+
33
+#include "udomain.h"
34
+#include "urecord.h"
35
+
36
+
37
+struct udomain;
38
+struct urecord;
39
+
40
+
41
+typedef struct hslot {
42
+	int n;                  /*!< Number of elements in the collision slot */
43
+	struct urecord* first;  /*!< First element in the list */
44
+	struct urecord* last;   /*!< Last element in the list */
45
+	struct udomain* d;      /*!< Domain we belong to */
46
+	rec_lock_t rlock;       /*!< Recursive lock for hash entry */
47
+} hslot_t;
48
+
49
+/*! \brief
50
+ * Initialize slot structure
51
+ */
52
+int init_slot(struct udomain* _d, hslot_t* _s, int n);
53
+
54
+
55
+/*! \brief
56
+ * Deinitialize given slot structure
57
+ */
58
+void deinit_slot(hslot_t* _s);
59
+
60
+
61
+/*! \brief
62
+ * Add an element to slot linked list
63
+ */
64
+void slot_add(hslot_t* _s, struct urecord* _r);
65
+
66
+
67
+/*! \brief
68
+ * Remove an element from slot linked list
69
+ */
70
+void slot_rem(hslot_t* _s, struct urecord* _r);
71
+
72
+#endif /* HSLOT_H */