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
... ...
@@ -46,7 +46,7 @@
46 46
 #ifndef HSLOT_H
47 47
 #define HSLOT_H
48 48
 
49
-#include "../../locking.h"
49
+#include "../../core/locking.h"
50 50
 
51 51
 #include "udomain.h"
52 52
 #include "pcontact.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,84 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * Copyright (C) 2012 Smile Communications, jason.penton@smilecoms.com
5
+ * Copyright (C) 2012 Smile Communications, richard.good@smilecoms.com
6
+ * 
7
+ * The initial version of this code was written by Dragos Vingarzan
8
+ * (dragos(dot)vingarzan(at)fokus(dot)fraunhofer(dot)de and the
9
+ * Fruanhofer Institute. It was and still is maintained in a separate
10
+ * branch of the original SER. We are therefore migrating it to
11
+ * Kamailio/SR and look forward to maintaining it from here on out.
12
+ * 2011/2012 Smile Communications, Pty. Ltd.
13
+ * ported/maintained/improved by 
14
+ * Jason Penton (jason(dot)penton(at)smilecoms.com and
15
+ * Richard Good (richard(dot)good(at)smilecoms.com) as part of an 
16
+ * effort to add full IMS support to Kamailio/SR using a new and
17
+ * improved architecture
18
+ * 
19
+ * NB: Alot of this code was originally part of OpenIMSCore,
20
+ * FhG Fokus. 
21
+ * Copyright (C) 2004-2006 FhG Fokus
22
+ * Thanks for great work! This is an effort to 
23
+ * break apart the various CSCF functions into logically separate
24
+ * components. We hope this will drive wider use. We also feel
25
+ * that in this way the architecture is more complete and thereby easier
26
+ * to manage in the Kamailio/SR environment
27
+ *
28
+ * This file is part of Kamailio, a free SIP server.
29
+ *
30
+ * Kamailio is free software; you can redistribute it and/or modify
31
+ * it under the terms of the GNU General Public License as published by
32
+ * the Free Software Foundation; either version 2 of the License, or
33
+ * (at your option) any later version
34
+ *
35
+ * Kamailio is distributed in the hope that it will be useful,
36
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
37
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
38
+ * GNU General Public License for more details.
39
+ *
40
+ * You should have received a copy of the GNU General Public License 
41
+ * along with this program; if not, write to the Free Software 
42
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
43
+ * 
44
+ */
45
+
46
+#ifndef HSLOT_H
47
+#define HSLOT_H
48
+
49
+#include "../../locking.h"
50
+
51
+#include "udomain.h"
52
+#include "pcontact.h"
53
+
54
+
55
+struct udomain;
56
+struct pcontact;
57
+
58
+
59
+typedef struct hslot {
60
+	int n;                  	/*!< Number of elements in the collision slot */
61
+	struct pcontact* first;  	/*!< First element in the list */
62
+	struct pcontact* last;   	/*!< Last element in the list */
63
+	struct udomain* d;      	/*!< Domain we belong to */
64
+#ifdef GEN_LOCK_T_PREFERED
65
+	gen_lock_t *lock;       	/*!< Lock for hash entry - fastlock */
66
+#else
67
+	int lockidx;            	/*!< Lock index for hash entry - the rest*/
68
+#endif
69
+} hslot_t;
70
+
71
+void init_slot(struct udomain* _d, hslot_t* _s, int n);
72
+void deinit_slot(hslot_t* _s);
73
+void slot_add(hslot_t* _s, struct pcontact* _r);
74
+void slot_rem(hslot_t* _s, struct pcontact* _r);
75
+int ul_init_locks(void);
76
+void ul_unlock_locks(void);
77
+void ul_destroy_locks(void);
78
+
79
+#ifndef GEN_LOCK_T_PREFERED
80
+void ul_lock_idx(int idx);
81
+void ul_release_idx(int idx);
82
+#endif
83
+
84
+#endif /* HSLOT_H */