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
deleted file mode 100644
... ...
@@ -1,60 +0,0 @@
1
-/* 
2
- * Copyright (C) 2007 iptelorg GmbH
3
- *
4
- * Permission to use, copy, modify, and distribute this software for any
5
- * purpose with or without fee is hereby granted, provided that the above
6
- * copyright notice and this permission notice appear in all copies.
7
- *
8
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
- */
16
-
17
-/*!
18
- * \file
19
- * \brief Kamailio core ::  lock operations init
20
- * \ingroup core
21
- *
22
- * Module: \ref core
23
- *
24
- * Reference:
25
- * - \ref LockingDoc
26
- */
27
-
28
-/*!
29
- * \page LockingDoc Documentation of locking
30
- * \verbinclude locking.txt
31
- *
32
- */
33
-
34
-
35
-
36
-#include "ut.h"
37
-#include "dprint.h"
38
-#include "lock_ops.h"
39
-
40
-/* returns 0 on success, -1 on error */
41
-int init_lock_ops(void)
42
-{
43
-#ifdef USE_FUTEX
44
-	int os_ver;
45
-	
46
-	os_ver=get_sys_version(0, 0, 0);
47
-	if (os_ver < 0x020546 ){ /* if ver < 2.5.70 */
48
-		LM_CRIT("old kernel: compiled with FUTEX support which is not"
49
-				" present in the running kernel (try  2.6+)\n");
50
-		return -1;
51
-	}
52
-#endif
53
-	return 0;
54
-}
55
-
56
-
57
-
58
-void destroy_lock_ops(void)
59
-{
60
-}
Browse code

Core Removed history, svn $id$ and doxygen udpates on the .c files

Olle E. Johansson authored on 03/01/2015 09:53:17
Showing 1 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 /* 
2
- * $Id$
3
- * 
4 2
  * Copyright (C) 2007 iptelorg GmbH
5 3
  *
6 4
  * Permission to use, copy, modify, and distribute this software for any
... ...
@@ -15,18 +13,10 @@
15 13
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 14
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 15
  */
18
-/*
19
- *  lock operations init
20
- */
21
-/* 
22
- * History:
23
- * --------
24
- *  2007-05-14  created by andrei
25
- */
26 16
 
27 17
 /*!
28 18
  * \file
29
- * \brief SIP-router core :: 
19
+ * \brief Kamailio core ::  lock operations init
30 20
  * \ingroup core
31 21
  *
32 22
  * Module: \ref core
Browse code

lock_ops.c: logging: convert LOG to LM_*

Ovidiu Sas authored on 03/10/2014 21:22:31
Showing 1 changed files
... ...
@@ -55,9 +55,8 @@ int init_lock_ops(void)
55 55
 	
56 56
 	os_ver=get_sys_version(0, 0, 0);
57 57
 	if (os_ver < 0x020546 ){ /* if ver < 2.5.70 */
58
-		LOG(L_CRIT, "ERROR: init_lock_ops: old kernel:"
59
-				" compiled with FUTEX support which is not present in the"
60
-				" running kernel (try  2.6+)\n");
58
+		LM_CRIT("old kernel: compiled with FUTEX support which is not"
59
+				" present in the running kernel (try  2.6+)\n");
61 60
 		return -1;
62 61
 	}
63 62
 #endif
Browse code

core: Added void to declarations of functions with empty argument list

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)

Marius Zbihlei authored on 02/04/2012 14:19:17
Showing 1 changed files
... ...
@@ -48,7 +48,7 @@
48 48
 #include "lock_ops.h"
49 49
 
50 50
 /* returns 0 on success, -1 on error */
51
-int init_lock_ops()
51
+int init_lock_ops(void)
52 52
 {
53 53
 #ifdef USE_FUTEX
54 54
 	int os_ver;
... ...
@@ -66,6 +66,6 @@ int init_lock_ops()
66 66
 
67 67
 
68 68
 
69
-void destroy_lock_ops()
69
+void destroy_lock_ops(void)
70 70
 {
71 71
 }
Browse code

Documentation updates

- Including locking.txt in doxygen
- Updating other files (ser -> sip-router)

oej authored on 21/10/2009 08:09:03
Showing 1 changed files
... ...
@@ -28,9 +28,20 @@
28 28
  * \file
29 29
  * \brief SIP-router core :: 
30 30
  * \ingroup core
31
+ *
31 32
  * Module: \ref core
33
+ *
34
+ * Reference:
35
+ * - \ref LockingDoc
32 36
  */
33 37
 
38
+/*!
39
+ * \page LockingDoc Documentation of locking
40
+ * \verbinclude locking.txt
41
+ *
42
+ */
43
+
44
+
34 45
 
35 46
 #include "ut.h"
36 47
 #include "dprint.h"
Browse code

Adding doxygen template to all core .c files

Please fill in after the :: to explain the function of this file.

oej authored on 10/10/2009 13:54:13
Showing 1 changed files
... ...
@@ -24,6 +24,14 @@
24 24
  *  2007-05-14  created by andrei
25 25
  */
26 26
 
27
+/*!
28
+ * \file
29
+ * \brief SIP-router core :: 
30
+ * \ingroup core
31
+ * Module: \ref core
32
+ */
33
+
34
+
27 35
 #include "ut.h"
28 36
 #include "dprint.h"
29 37
 #include "lock_ops.h"
Browse code

- magic include reordering to work around type declaration conflicts between linux-libc-dev and libc headers in debian

Andrei Pelinescu-Onciul authored on 06/08/2008 15:24:27
Showing 1 changed files
... ...
@@ -24,9 +24,9 @@
24 24
  *  2007-05-14  created by andrei
25 25
  */
26 26
 
27
-#include "lock_ops.h"
28 27
 #include "ut.h"
29 28
 #include "dprint.h"
29
+#include "lock_ops.h"
30 30
 
31 31
 /* returns 0 on success, -1 on error */
32 32
 int init_lock_ops()
Browse code

- added futex based locking, used by default on linux 2.5.70+ (to turn it off compile with make use_futex=no) - moved get_sys_ver from io_wait.c into ut.c

Andrei Pelinescu-Onciul authored on 14/05/2007 21:29:46
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,52 @@
1
+/* 
2
+ * $Id$
3
+ * 
4
+ * Copyright (C) 2007 iptelorg GmbH
5
+ *
6
+ * Permission to use, copy, modify, and distribute this software for any
7
+ * purpose with or without fee is hereby granted, provided that the above
8
+ * copyright notice and this permission notice appear in all copies.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
+ */
18
+/*
19
+ *  lock operations init
20
+ */
21
+/* 
22
+ * History:
23
+ * --------
24
+ *  2007-05-14  created by andrei
25
+ */
26
+
27
+#include "lock_ops.h"
28
+#include "ut.h"
29
+#include "dprint.h"
30
+
31
+/* returns 0 on success, -1 on error */
32
+int init_lock_ops()
33
+{
34
+#ifdef USE_FUTEX
35
+	int os_ver;
36
+	
37
+	os_ver=get_sys_version(0, 0, 0);
38
+	if (os_ver < 0x020546 ){ /* if ver < 2.5.70 */
39
+		LOG(L_CRIT, "ERROR: init_lock_ops: old kernel:"
40
+				" compiled with FUTEX support which is not present in the"
41
+				" running kernel (try  2.6+)\n");
42
+		return -1;
43
+	}
44
+#endif
45
+	return 0;
46
+}
47
+
48
+
49
+
50
+void destroy_lock_ops()
51
+{
52
+}