- 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)
1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,55 +0,0 @@ |
1 |
-/* |
|
2 |
- * Copyright (C) 2005-2006 iptelorg GmbH |
|
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 |
- |
|
22 |
-/*! |
|
23 |
- * \file |
|
24 |
- * \brief Kamailio core :: Select result buffers |
|
25 |
- * \author mma |
|
26 |
- * \ingroup core |
|
27 |
- * Module: \ref core |
|
28 |
- */ |
|
29 |
- |
|
30 |
-#ifndef SELECT_BUFFER_H |
|
31 |
-#define SELECT_BUFFER_H |
|
32 |
- |
|
33 |
-#include "str.h" |
|
34 |
- |
|
35 |
-/** |
|
36 |
- * Request for space from buffer |
|
37 |
- * |
|
38 |
- * Returns: NULL memory allocation failure (no more space) |
|
39 |
- * pointer to the space on success |
|
40 |
- */ |
|
41 |
- |
|
42 |
-char* get_static_buffer(int req_size); |
|
43 |
- |
|
44 |
-/** Internal function - called before request is going to be processed |
|
45 |
- * |
|
46 |
- * Reset offset to unused space |
|
47 |
- */ |
|
48 |
-int reset_static_buffer(void); |
|
49 |
- |
|
50 |
-int str_to_static_buffer(str* res, str* s); |
|
51 |
-int int_to_static_buffer(str* res, int val); |
|
52 |
-int uint_to_static_buffer(str* res, unsigned int val); |
|
53 |
-int uint_to_static_buffer_ex(str* res, unsigned int val, int base, int pad); |
|
54 |
- |
|
55 |
-#endif /* SELECT_BUFFER_H */ |
... | ... |
@@ -1,21 +1,14 @@ |
1 | 1 |
/* |
2 |
- * $Id$ |
|
3 |
- * |
|
4 | 2 |
* Copyright (C) 2005-2006 iptelorg GmbH |
5 | 3 |
* |
6 |
- * This file is part of ser, a free SIP server. |
|
4 |
+ * This file is part of Kamailio, a free SIP server. |
|
7 | 5 |
* |
8 |
- * ser is free software; you can redistribute it and/or modify |
|
6 |
+ * Kamailio is free software; you can redistribute it and/or modify |
|
9 | 7 |
* it under the terms of the GNU General Public License as published by |
10 | 8 |
* the Free Software Foundation; either version 2 of the License, or |
11 | 9 |
* (at your option) any later version |
12 | 10 |
* |
13 |
- * For a license to use the ser software under conditions |
|
14 |
- * other than those described here, or to purchase support for this |
|
15 |
- * software, please contact iptel.org by e-mail at the following addresses: |
|
16 |
- * info@iptel.org |
|
17 |
- * |
|
18 |
- * ser is distributed in the hope that it will be useful, |
|
11 |
+ * Kamailio is distributed in the hope that it will be useful, |
|
19 | 12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | 13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | 14 |
* GNU General Public License for more details. |
... | ... |
@@ -24,12 +17,14 @@ |
24 | 17 |
* along with this program; if not, write to the Free Software |
25 | 18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
26 | 19 |
* |
27 |
- * History: |
|
28 |
- * -------- |
|
29 |
- * 2006-06-16 static buffer for select results (mma) |
|
30 |
- * each process owns a separate space |
|
31 |
- * each request starts using the buffer from the start |
|
32 |
- * |
|
20 |
+ */ |
|
21 |
+ |
|
22 |
+/*! |
|
23 |
+ * \file |
|
24 |
+ * \brief Kamailio core :: Select result buffers |
|
25 |
+ * \author mma |
|
26 |
+ * \ingroup core |
|
27 |
+ * Module: \ref core |
|
33 | 28 |
*/ |
34 | 29 |
|
35 | 30 |
#ifndef SELECT_BUFFER_H |
... | ... |
@@ -37,7 +32,7 @@ |
37 | 32 |
|
38 | 33 |
#include "str.h" |
39 | 34 |
|
40 |
-/* |
|
35 |
+/** |
|
41 | 36 |
* Request for space from buffer |
42 | 37 |
* |
43 | 38 |
* Returns: NULL memory allocation failure (no more space) |
... | ... |
@@ -46,11 +41,10 @@ |
46 | 41 |
|
47 | 42 |
char* get_static_buffer(int req_size); |
48 | 43 |
|
49 |
-/* Internal function - called before request is going to be processed |
|
44 |
+/** Internal function - called before request is going to be processed |
|
50 | 45 |
* |
51 | 46 |
* Reset offset to unused space |
52 | 47 |
*/ |
53 |
- |
|
54 | 48 |
int reset_static_buffer(void); |
55 | 49 |
|
56 | 50 |
int str_to_static_buffer(str* res, str* s); |
... | ... |
@@ -22,7 +22,7 @@ |
22 | 22 |
* |
23 | 23 |
* You should have received a copy of the GNU General Public License |
24 | 24 |
* along with this program; if not, write to the Free Software |
25 |
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
25 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
26 | 26 |
* |
27 | 27 |
* History: |
28 | 28 |
* -------- |
In C language, a declaration in the form int f(); is equivalent to int f(...);, thus being able to accept an indefinit number of parameters. With the -Wstrict-prototypes GCC options, these declarations are reported as "function declaration isn’t a prototype".
On some cases, this may trick the compiler into generating unoptimized code (like preparing to handle variadic argument list).
In all cases having a declaration int f() and a definition inf f(int) is missleading, even if standard compliant.
This is still Work in Progress. (maybe adding the -Wstrict-prototypes option to default is desireable)
... | ... |
@@ -54,6 +54,6 @@ int reset_static_buffer(); |
54 | 54 |
int str_to_static_buffer(str* res, str* s); |
55 | 55 |
int int_to_static_buffer(str* res, int val); |
56 | 56 |
int uint_to_static_buffer(str* res, unsigned int val); |
57 |
-int uint_ex_to_static_buffer(str* res, unsigned int val, int base, int pad); |
|
57 |
+int uint_to_static_buffer_ex(str* res, unsigned int val, int base, int pad); |
|
58 | 58 |
|
59 | 59 |
#endif /* SELECT_BUFFER_H */ |
... | ... |
@@ -51,4 +51,9 @@ char* get_static_buffer(int req_size); |
51 | 51 |
|
52 | 52 |
int reset_static_buffer(); |
53 | 53 |
|
54 |
+int str_to_static_buffer(str* res, str* s); |
|
55 |
+int int_to_static_buffer(str* res, int val); |
|
56 |
+int uint_to_static_buffer(str* res, unsigned int val); |
|
57 |
+int uint_ex_to_static_buffer(str* res, unsigned int val, int base, int pad); |
|
58 |
+ |
|
54 | 59 |
#endif /* SELECT_BUFFER_H */ |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,54 @@ |
1 |
+/* |
|
2 |
+ * $Id$ |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2005-2006 iptelorg GmbH |
|
5 |
+ * |
|
6 |
+ * This file is part of ser, a free SIP server. |
|
7 |
+ * |
|
8 |
+ * ser is free software; you can redistribute it and/or modify |
|
9 |
+ * it under the terms of the GNU General Public License as published by |
|
10 |
+ * the Free Software Foundation; either version 2 of the License, or |
|
11 |
+ * (at your option) any later version |
|
12 |
+ * |
|
13 |
+ * For a license to use the ser software under conditions |
|
14 |
+ * other than those described here, or to purchase support for this |
|
15 |
+ * software, please contact iptel.org by e-mail at the following addresses: |
|
16 |
+ * info@iptel.org |
|
17 |
+ * |
|
18 |
+ * ser is distributed in the hope that it will be useful, |
|
19 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
20 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
21 |
+ * GNU General Public License for more details. |
|
22 |
+ * |
|
23 |
+ * You should have received a copy of the GNU General Public License |
|
24 |
+ * along with this program; if not, write to the Free Software |
|
25 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
26 |
+ * |
|
27 |
+ * History: |
|
28 |
+ * -------- |
|
29 |
+ * 2006-06-16 static buffer for select results (mma) |
|
30 |
+ * each process owns a separate space |
|
31 |
+ * each request starts using the buffer from the start |
|
32 |
+ * |
|
33 |
+ */ |
|
34 |
+ |
|
35 |
+#ifndef SELECT_BUFFER_H |
|
36 |
+#define SELECT_BUFFER_H |
|
37 |
+ |
|
38 |
+/* |
|
39 |
+ * Request for space from buffer |
|
40 |
+ * |
|
41 |
+ * Returns: NULL memory allocation failure (no more space) |
|
42 |
+ * pointer to the space on success |
|
43 |
+ */ |
|
44 |
+ |
|
45 |
+char* get_static_buffer(int req_size); |
|
46 |
+ |
|
47 |
+/* Internal function - called before request is going to be processed |
|
48 |
+ * |
|
49 |
+ * Reset offset to unused space |
|
50 |
+ */ |
|
51 |
+ |
|
52 |
+int reset_static_buffer(); |
|
53 |
+ |
|
54 |
+#endif /* SELECT_BUFFER_H */ |