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,58 +0,0 @@
1
-/* 
2
- * Copyright (C) 2001-2003 FhG Fokus
3
- * Copyright (C) 2006-2007 iptelorg GmbH
4
- *
5
- * This file is part of Kamailio, a free SIP server.
6
- *
7
- * Kamailio is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; either version 2 of the License, or
10
- * (at your option) any later version
11
- *
12
- * Kamailio is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License 
18
- * along with this program; if not, write to the Free Software 
19
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20
- */
21
-
22
-#include "my_fld.h"
23
-
24
-#include "../../mem/mem.h"
25
-#include "../../dprint.h"
26
-#include "../../lib/srdb2/db_gen.h"
27
-
28
-#include <string.h>
29
-
30
-
31
-static void my_fld_free(db_fld_t* fld, struct my_fld* payload)
32
-{
33
-	db_drv_free(&payload->gen);
34
-	if (payload->buf.s) pkg_free(payload->buf.s);
35
-	if (payload->name) pkg_free(payload->name);
36
-	pkg_free(payload);
37
-}
38
-
39
-
40
-int my_fld(db_fld_t* fld, char* table)
41
-{
42
-	struct my_fld* res;
43
-
44
-	res = (struct my_fld*)pkg_malloc(sizeof(struct my_fld));
45
-	if (res == NULL) {
46
-		ERR("mysql: No memory left\n");
47
-		return -1;
48
-	}
49
-	memset(res, '\0', sizeof(struct my_fld));
50
-	if (db_drv_init(&res->gen, my_fld_free) < 0) goto error;
51
-
52
-	DB_SET_PAYLOAD(fld, res);
53
-	return 0;
54
-
55
- error:
56
-	if (res) pkg_free(res);
57
-	return -1;
58
-}
Browse code

db_mysql: Remove SVN ID's, remove history sections

Olle E. Johansson authored on 11/03/2015 15:26:21
Showing 1 changed files
... ...
@@ -1,22 +1,15 @@
1 1
 /* 
2
- * $Id$
3
- *
4 2
  * Copyright (C) 2001-2003 FhG Fokus
5 3
  * Copyright (C) 2006-2007 iptelorg GmbH
6 4
  *
7
- * This file is part of ser, a free SIP server.
5
+ * This file is part of Kamailio, a free SIP server.
8 6
  *
9
- * ser is free software; you can redistribute it and/or modify
7
+ * Kamailio is free software; you can redistribute it and/or modify
10 8
  * it under the terms of the GNU General Public License as published by
11 9
  * the Free Software Foundation; either version 2 of the License, or
12 10
  * (at your option) any later version
13 11
  *
14
- * For a license to use the ser software under conditions
15
- * other than those described here, or to purchase support for this
16
- * software, please contact iptel.org by e-mail at the following addresses:
17
- *    info@iptel.org
18
- *
19
- * ser is distributed in the hope that it will be useful,
12
+ * Kamailio is distributed in the hope that it will be useful,
20 13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 14
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 15
  * GNU General Public License for more details.
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
 #include "my_fld.h"
Browse code

Changes necessary to make the module compile in the sip-router tree.

This is a set of changes necessary to make the LDAP module compile in the
sip-router tree. This includes:
* Extra stuff in the Makefile to link with libsrdb2
* Defined SER_MOD_INTERFACE in the makefile
* Updated relative paths to srdb2 header files

Jan Janak authored on 13/02/2009 00:51:33
Showing 1 changed files
... ...
@@ -30,7 +30,7 @@
30 30
 
31 31
 #include "../../mem/mem.h"
32 32
 #include "../../dprint.h"
33
-#include "../../db/db_gen.h"
33
+#include "../../lib/srdb2/db_gen.h"
34 34
 
35 35
 #include <string.h>
36 36
 
Browse code

- reordered included header files for better detection of missing headers - disable automatic database reconnects, they do not work with pre-compiled statements - error/info/log message cleanup - auto_reconnect module parameter removed - introduced new module parameter retries which controls the number of times queries are tried to execute on server on failures

Jan Janak authored on 16/01/2008 14:17:28
Showing 1 changed files
... ...
@@ -26,11 +26,13 @@
26 26
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
27 27
  */
28 28
 
29
-#include <string.h>
29
+#include "my_fld.h"
30
+
30 31
 #include "../../mem/mem.h"
31 32
 #include "../../dprint.h"
32 33
 #include "../../db/db_gen.h"
33
-#include "my_fld.h"
34
+
35
+#include <string.h>
34 36
 
35 37
 
36 38
 static void my_fld_free(db_fld_t* fld, struct my_fld* payload)
... ...
@@ -48,7 +50,7 @@ int my_fld(db_fld_t* fld, char* table)
48 50
 
49 51
 	res = (struct my_fld*)pkg_malloc(sizeof(struct my_fld));
50 52
 	if (res == NULL) {
51
-		ERR("No memory left\n");
53
+		ERR("mysql: No memory left\n");
52 54
 		return -1;
53 55
 	}
54 56
 	memset(res, '\0', sizeof(struct my_fld));
Browse code

- a couple of minor bug fixes backported from internal verion - support for "fake NULL" values (strings or integers that will be written in database if the value is NULL) (compile time option) - proper support for raw SQL statements - the possibility to retrieve fields in the result set and their types from the server added (needed for queries like select *).

Jan Janak authored on 15/11/2007 17:27:06
Showing 1 changed files
... ...
@@ -37,6 +37,7 @@ static void my_fld_free(db_fld_t* fld, struct my_fld* payload)
37 37
 {
38 38
 	db_drv_free(&payload->gen);
39 39
 	if (payload->buf.s) pkg_free(payload->buf.s);
40
+	if (payload->name) pkg_free(payload->name);
40 41
 	pkg_free(payload);
41 42
 }
42 43
 
Browse code

- db_fld.v.str renamed to db_fld.v.lstr due to problems with g++

Jan Janak authored on 18/04/2007 13:08:45
Showing 1 changed files
... ...
@@ -41,7 +41,7 @@ static void my_fld_free(db_fld_t* fld, struct my_fld* payload)
41 41
 }
42 42
 
43 43
 
44
-int my_fld(db_fld_t* fld)
44
+int my_fld(db_fld_t* fld, char* table)
45 45
 {
46 46
 	struct my_fld* res;
47 47
 
Browse code

- extra debugging messages removed

Jan Janak authored on 04/04/2007 13:59:17
Showing 1 changed files
... ...
@@ -45,8 +45,6 @@ int my_fld(db_fld_t* fld)
45 45
 {
46 46
 	struct my_fld* res;
47 47
 
48
-	ERR("my_fld executed\n");
49
-
50 48
 	res = (struct my_fld*)pkg_malloc(sizeof(struct my_fld));
51 49
 	if (res == NULL) {
52 50
 		ERR("No memory left\n");
Browse code

- mysql module updated to new db api

Jan Janak authored on 04/04/2007 11:48:20
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,64 @@
1
+/* 
2
+ * $Id$
3
+ *
4
+ * Copyright (C) 2001-2003 FhG Fokus
5
+ * Copyright (C) 2006-2007 iptelorg GmbH
6
+ *
7
+ * This file is part of ser, a free SIP server.
8
+ *
9
+ * ser is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version
13
+ *
14
+ * For a license to use the ser software under conditions
15
+ * other than those described here, or to purchase support for this
16
+ * software, please contact iptel.org by e-mail at the following addresses:
17
+ *    info@iptel.org
18
+ *
19
+ * ser is distributed in the hope that it will be useful,
20
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
+ * GNU General Public License for more details.
23
+ *
24
+ * You should have received a copy of the GNU General Public License 
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
27
+ */
28
+
29
+#include <string.h>
30
+#include "../../mem/mem.h"
31
+#include "../../dprint.h"
32
+#include "../../db/db_gen.h"
33
+#include "my_fld.h"
34
+
35
+
36
+static void my_fld_free(db_fld_t* fld, struct my_fld* payload)
37
+{
38
+	db_drv_free(&payload->gen);
39
+	if (payload->buf.s) pkg_free(payload->buf.s);
40
+	pkg_free(payload);
41
+}
42
+
43
+
44
+int my_fld(db_fld_t* fld)
45
+{
46
+	struct my_fld* res;
47
+
48
+	ERR("my_fld executed\n");
49
+
50
+	res = (struct my_fld*)pkg_malloc(sizeof(struct my_fld));
51
+	if (res == NULL) {
52
+		ERR("No memory left\n");
53
+		return -1;
54
+	}
55
+	memset(res, '\0', sizeof(struct my_fld));
56
+	if (db_drv_init(&res->gen, my_fld_free) < 0) goto error;
57
+
58
+	DB_SET_PAYLOAD(fld, res);
59
+	return 0;
60
+
61
+ error:
62
+	if (res) pkg_free(res);
63
+	return -1;
64
+}