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,102 +0,0 @@
1
-/*
2
- * here, we delete message lumps which are generated in
3
- * core functions using pkg_malloc and applied to shmem
4
- * requests; not doing so would result ugly memory problems
5
- *
6
- * I admit it is not a nice hack; -jiri 
7
- *
8
- * Copyright (C) 2001-2003 FhG Fokus
9
- *
10
- * This file is part of Kamailio, a free SIP server.
11
- *
12
- * Kamailio is free software; you can redistribute it and/or modify
13
- * it under the terms of the GNU General Public License as published by
14
- * the Free Software Foundation; either version 2 of the License, or
15
- * (at your option) any later version
16
- *
17
- * Kamailio is distributed in the hope that it will be useful,
18
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
- * GNU General Public License for more details.
21
- *
22
- * You should have received a copy of the GNU General Public License 
23
- * along with this program; if not, write to the Free Software 
24
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
25
- */
26
-/*!
27
-* \file
28
-* \brief Kamailio core :: Lump handling
29
-* \ingroup core
30
-* Module: \ref core
31
- * here, we delete message lumps which are generated in
32
- * core functions using pkg_malloc and applied to shmem
33
- * requests; not doing so would result ugly memory problems
34
- *
35
- * I admit it is not a nice hack; -jiri 
36
-*/
37
-
38
-
39
-
40
-#ifndef _FIX_LUMPS_H
41
-#define _FIX_LUMPS_H
42
-
43
-
44
-
45
-/** @brief used to delete attached via lumps from msg;
46
-
47
-   msg can be either an original pkg msg, whose Via lump I want
48
-   to delete before generating next branch, or a shmem-stored
49
-   message processed during on_reply -- then I want to
50
-   delete the Via lump for the same reason
51
-
52
-   the other case when I want to delete them is when a message
53
-   is stored in shmem for branch picking, forwarded lated and
54
-   Via removal is applied to the shmem-ed message
55
-
56
-   the same thing for Content-Length lumps (FIXME: this
57
-   should be done in a nicer way)
58
-*/
59
-inline static void free_via_clen_lump( struct lump **list )
60
-{
61
-	struct lump *prev_lump, *lump, *a, *foo, *next;
62
-
63
-	next=0;
64
-	prev_lump=0;
65
-	for(lump=*list;lump;lump=next) {
66
-		next=lump->next;
67
-		if (lump->type==HDR_VIA_T||lump->type==HDR_CONTENTLENGTH_T) {
68
-			if (lump->flags & (LUMPFLAG_DUPED|LUMPFLAG_SHMEM)){
69
-				LM_CRIT("free_via_clen_lmp: lump %p, flags %x\n",
70
-						lump, lump->flags);
71
-				/* ty to continue */
72
-			}
73
-			a=lump->before;
74
-			while(a) {
75
-				foo=a; a=a->before;
76
-				if (!(foo->flags&(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)))
77
-					free_lump(foo);
78
-				if (!(foo->flags&LUMPFLAG_SHMEM))
79
-					pkg_free(foo);
80
-			}
81
-			a=lump->after;
82
-			while(a) {
83
-				foo=a; a=a->after;
84
-				if (!(foo->flags&(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)))
85
-					free_lump(foo);
86
-				if (!(foo->flags&LUMPFLAG_SHMEM))
87
-					pkg_free(foo);
88
-			}
89
-			if (prev_lump) prev_lump->next = lump->next;
90
-			else *list = lump->next;
91
-			if (!(lump->flags&(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)))
92
-				free_lump(lump);
93
-			if (!(lump->flags&LUMPFLAG_SHMEM))
94
-				pkg_free(lump);
95
-		} else {
96
-			/* store previous position */
97
-			prev_lump=lump;
98
-		}
99
-	}
100
-}
101
-
102
-#endif
Browse code

core : Update include files - delete IDs, update doxygen, delete history

Olle E. Johansson authored on 03/01/2015 10:55:48
Showing 1 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 /*
2
- * $Id$
3
- *
4 2
  * here, we delete message lumps which are generated in
5 3
  * core functions using pkg_malloc and applied to shmem
6 4
  * requests; not doing so would result ugly memory problems
... ...
@@ -9,14 +7,14 @@
9 7
  *
10 8
  * Copyright (C) 2001-2003 FhG Fokus
11 9
  *
12
- * This file is part of ser, a free SIP server.
10
+ * This file is part of Kamailio, a free SIP server.
13 11
  *
14
- * ser is free software; you can redistribute it and/or modify
12
+ * Kamailio is free software; you can redistribute it and/or modify
15 13
  * it under the terms of the GNU General Public License as published by
16 14
  * the Free Software Foundation; either version 2 of the License, or
17 15
  * (at your option) any later version
18 16
  *
19
- * ser is distributed in the hope that it will be useful,
17
+ * Kamailio is distributed in the hope that it will be useful,
20 18
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 19
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 20
  * GNU General Public License for more details.
... ...
@@ -25,14 +23,17 @@
25 23
  * along with this program; if not, write to the Free Software 
26 24
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
27 25
  */
28
-/*
29
- * History:
30
- * -------
31
- *  2003-11-24  changed free_via_lump to free_via_clen_lump and make it
32
- *              handle CONTENTLENGTH lumps also (andrei)
33
- *  2005-07-04  lumps in SHM or dup'ed lumps are not freed and an warning
34
- *               message is logged (temporary fix) (andrei)
35
- */
26
+/*!
27
+* \file
28
+* \brief Kamailio core :: Lump handling
29
+* \ingroup core
30
+* Module: \ref core
31
+ * here, we delete message lumps which are generated in
32
+ * core functions using pkg_malloc and applied to shmem
33
+ * requests; not doing so would result ugly memory problems
34
+ *
35
+ * I admit it is not a nice hack; -jiri 
36
+*/
36 37
 
37 38
 
38 39
 
Browse code

fix_lumps.h: logging: convert LOG to LM_*

Ovidiu Sas authored on 03/10/2014 18:43:15
Showing 1 changed files
... ...
@@ -65,7 +65,7 @@ inline static void free_via_clen_lump( struct lump **list )
65 65
 		next=lump->next;
66 66
 		if (lump->type==HDR_VIA_T||lump->type==HDR_CONTENTLENGTH_T) {
67 67
 			if (lump->flags & (LUMPFLAG_DUPED|LUMPFLAG_SHMEM)){
68
-				LOG(L_CRIT, "BUG: free_via_clen_lmp: lump %p, flags %x\n",
68
+				LM_CRIT("free_via_clen_lmp: lump %p, flags %x\n",
69 69
 						lump, lump->flags);
70 70
 				/* ty to continue */
71 71
 			}
Browse code

all: updated FSF address in GPL text

Anthony Messina authored on 04/07/2014 09:36:37 • Daniel-Constantin Mierla committed on 04/07/2014 09:37:36
Showing 1 changed files
... ...
@@ -23,7 +23,7 @@
23 23
  *
24 24
  * You should have received a copy of the GNU General Public License 
25 25
  * along with this program; if not, write to the Free Software 
26
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
27 27
  */
28 28
 /*
29 29
  * History:
Browse code

Documentation and doxygen updates

oej authored on 25/10/2009 19:49:25
Showing 1 changed files
... ...
@@ -16,11 +16,6 @@
16 16
  * the Free Software Foundation; either version 2 of the License, or
17 17
  * (at your option) any later version
18 18
  *
19
- * For a license to use the ser software under conditions
20
- * other than those described here, or to purchase support for this
21
- * software, please contact iptel.org by e-mail at the following addresses:
22
- *    info@iptel.org
23
- *
24 19
  * ser is distributed in the hope that it will be useful,
25 20
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 21
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
... ...
@@ -46,8 +41,9 @@
46 41
 
47 42
 
48 43
 
49
-/* used to delete attached via lumps from msg; msg can
50
-   be either an original pkg msg, whose Via lump I want
44
+/** @brief used to delete attached via lumps from msg;
45
+
46
+   msg can be either an original pkg msg, whose Via lump I want
51 47
    to delete before generating next branch, or a shmem-stored
52 48
    message processed during on_reply -- then I want to
53 49
    delete the Via lump for the same reason
Browse code

core+tm: moved sip msg clone functions to the core

- moved all sip msg clone related functions to the core, since the
xmlrpc modules will need them too.
- renamed sip_msg_cloner() to sip_msg_shm_clone().
- msg_lump_cloner() is no longer static and returns 1 for no
change, 0 for successful cloning and -1 on error.

Andrei Pelinescu-Onciul authored on 30/07/2009 13:35:37
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,105 @@
1
+/*
2
+ * $Id$
3
+ *
4
+ * here, we delete message lumps which are generated in
5
+ * core functions using pkg_malloc and applied to shmem
6
+ * requests; not doing so would result ugly memory problems
7
+ *
8
+ * I admit it is not a nice hack; -jiri 
9
+ *
10
+ * Copyright (C) 2001-2003 FhG Fokus
11
+ *
12
+ * This file is part of ser, a free SIP server.
13
+ *
14
+ * ser is free software; you can redistribute it and/or modify
15
+ * it under the terms of the GNU General Public License as published by
16
+ * the Free Software Foundation; either version 2 of the License, or
17
+ * (at your option) any later version
18
+ *
19
+ * For a license to use the ser software under conditions
20
+ * other than those described here, or to purchase support for this
21
+ * software, please contact iptel.org by e-mail at the following addresses:
22
+ *    info@iptel.org
23
+ *
24
+ * ser is distributed in the hope that it will be useful,
25
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
27
+ * GNU General Public License for more details.
28
+ *
29
+ * You should have received a copy of the GNU General Public License 
30
+ * along with this program; if not, write to the Free Software 
31
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
32
+ */
33
+/*
34
+ * History:
35
+ * -------
36
+ *  2003-11-24  changed free_via_lump to free_via_clen_lump and make it
37
+ *              handle CONTENTLENGTH lumps also (andrei)
38
+ *  2005-07-04  lumps in SHM or dup'ed lumps are not freed and an warning
39
+ *               message is logged (temporary fix) (andrei)
40
+ */
41
+
42
+
43
+
44
+#ifndef _FIX_LUMPS_H
45
+#define _FIX_LUMPS_H
46
+
47
+
48
+
49
+/* used to delete attached via lumps from msg; msg can
50
+   be either an original pkg msg, whose Via lump I want
51
+   to delete before generating next branch, or a shmem-stored
52
+   message processed during on_reply -- then I want to
53
+   delete the Via lump for the same reason
54
+
55
+   the other case when I want to delete them is when a message
56
+   is stored in shmem for branch picking, forwarded lated and
57
+   Via removal is applied to the shmem-ed message
58
+
59
+   the same thing for Content-Length lumps (FIXME: this
60
+   should be done in a nicer way)
61
+*/
62
+inline static void free_via_clen_lump( struct lump **list )
63
+{
64
+	struct lump *prev_lump, *lump, *a, *foo, *next;
65
+
66
+	next=0;
67
+	prev_lump=0;
68
+	for(lump=*list;lump;lump=next) {
69
+		next=lump->next;
70
+		if (lump->type==HDR_VIA_T||lump->type==HDR_CONTENTLENGTH_T) {
71
+			if (lump->flags & (LUMPFLAG_DUPED|LUMPFLAG_SHMEM)){
72
+				LOG(L_CRIT, "BUG: free_via_clen_lmp: lump %p, flags %x\n",
73
+						lump, lump->flags);
74
+				/* ty to continue */
75
+			}
76
+			a=lump->before;
77
+			while(a) {
78
+				foo=a; a=a->before;
79
+				if (!(foo->flags&(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)))
80
+					free_lump(foo);
81
+				if (!(foo->flags&LUMPFLAG_SHMEM))
82
+					pkg_free(foo);
83
+			}
84
+			a=lump->after;
85
+			while(a) {
86
+				foo=a; a=a->after;
87
+				if (!(foo->flags&(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)))
88
+					free_lump(foo);
89
+				if (!(foo->flags&LUMPFLAG_SHMEM))
90
+					pkg_free(foo);
91
+			}
92
+			if (prev_lump) prev_lump->next = lump->next;
93
+			else *list = lump->next;
94
+			if (!(lump->flags&(LUMPFLAG_DUPED|LUMPFLAG_SHMEM)))
95
+				free_lump(lump);
96
+			if (!(lump->flags&LUMPFLAG_SHMEM))
97
+				pkg_free(lump);
98
+		} else {
99
+			/* store previous position */
100
+			prev_lump=lump;
101
+		}
102
+	}
103
+}
104
+
105
+#endif