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,81 +0,0 @@
1
-/* 
2
- * Copyright (C) 2001-2005 iptel.org
3
- * Copyright (C) 2007-2008 1&1 Internet AG
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
-/**
23
- * \file lib/srdb1/db_pool.h
24
- * \brief Functions for managing a pool of database connections.
25
- * \ingroup db1
26
- */
27
-
28
-#ifndef _DB1_POOL_H
29
-#define _DB1_POOL_H
30
-
31
-#include "db_id.h"
32
-#include "db_con.h"
33
-
34
-
35
-/**
36
- * This is a stub that contains all attributes
37
- * that pool members must have, it is not really
38
- * used, real connection structures are created
39
- * by database backends. All such structures (
40
- * created by the backends) must have these
41
- * attributes.
42
- */
43
-struct pool_con {
44
-	struct db_id* id;        /**< Connection identifier */
45
-	unsigned int ref;        /**< Reference count */
46
-	struct pool_con* next;   /**< Next element in the pool */
47
-};
48
-
49
-
50
-/**
51
- * Search the pool for a connection with the identifier equal to
52
- * the id.
53
- * \param id searched id
54
- * \return the connection if it could be found, NULL otherwise
55
- */
56
-struct pool_con* pool_get(const struct db_id* id);
57
-
58
-
59
-/**
60
- * Insert a new connection into the pool.
61
- * \param con the inserted connection 
62
- */
63
-void pool_insert(struct pool_con* con);
64
-
65
-
66
-/**
67
- * Release a connection from the pool, the function
68
- * would return 1 when if the connection is not
69
- * referenced anymore and thus can be closed and
70
- * deleted by the backend. The function returns
71
- * 0 if the connection should still be kept open
72
- * because some other module is still using it.
73
- * The function returns -1 if the connection is
74
- * not in the pool.
75
- * \param con connection that should be removed
76
- * \return 1 if the connection can be freed, 0 if it can't be freed, -1 if not found
77
- */
78
-int pool_remove(struct pool_con* con);
79
-
80
-
81
-#endif /* _DB1_POOL_H */
Browse code

srdb1 Remove SVN id's and history

Olle E. Johansson authored on 04/01/2015 10:10:14
Showing 1 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 /* 
2
- * $Id$
3
- *
4 2
  * Copyright (C) 2001-2005 iptel.org
5 3
  * Copyright (C) 2007-2008 1&1 Internet AG
6 4
  *
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
... ...
@@ -18,7 +18,7 @@
18 18
  *
19 19
  * You should have received a copy of the GNU General Public License 
20 20
  * along with this program; if not, write to the Free Software 
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 22
  */
23 23
 
24 24
 /**
Browse code

Header file conditional macros renamed (DB_ -> DB1).

All macros protecting header files against multiple inclusions have been
renamed to make sure that there are no conflicts with header fields from srdb2
library.

Jan Janak authored on 12/02/2009 19:28:11
Showing 1 changed files
... ...
@@ -27,8 +27,8 @@
27 27
  * \ingroup db1
28 28
  */
29 29
 
30
-#ifndef _DB_POOL_H
31
-#define _DB_POOL_H
30
+#ifndef _DB1_POOL_H
31
+#define _DB1_POOL_H
32 32
 
33 33
 #include "db_id.h"
34 34
 #include "db_con.h"
... ...
@@ -80,4 +80,4 @@ void pool_insert(struct pool_con* con);
80 80
 int pool_remove(struct pool_con* con);
81 81
 
82 82
 
83
-#endif /* _POOL_H */
83
+#endif /* _DB1_POOL_H */
Browse code

Doxygen group renamed from db to db1.

Jan Janak authored on 12/02/2009 19:23:56
Showing 1 changed files
... ...
@@ -24,7 +24,7 @@
24 24
 /**
25 25
  * \file lib/srdb1/db_pool.h
26 26
  * \brief Functions for managing a pool of database connections.
27
- * \ingroup db
27
+ * \ingroup db1
28 28
  */
29 29
 
30 30
 #ifndef _DB_POOL_H
Browse code

Updated the value of \file doxygen tags.

Since we moved files in lib/srdb1 from another directory we also needed
to update the doxygen \file tags.

Jan Janak authored on 12/02/2009 19:23:12
Showing 1 changed files
... ...
@@ -22,7 +22,7 @@
22 22
  */
23 23
 
24 24
 /**
25
- * \file db/db_pool.h
25
+ * \file lib/srdb1/db_pool.h
26 26
  * \brief Functions for managing a pool of database connections.
27 27
  * \ingroup db
28 28
  */
Browse code

- change name in copyright headers

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4518 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 28/07/2008 15:39:28
Showing 1 changed files
... ...
@@ -4,14 +4,14 @@
4 4
  * Copyright (C) 2001-2005 iptel.org
5 5
  * Copyright (C) 2007-2008 1&1 Internet AG
6 6
  *
7
- * This file is part of openser, a free SIP server.
7
+ * This file is part of Kamailio, a free SIP server.
8 8
  *
9
- * openser is free software; you can redistribute it and/or modify
9
+ * Kamailio is free software; you can redistribute it and/or modify
10 10
  * it under the terms of the GNU General Public License as published by
11 11
  * the Free Software Foundation; either version 2 of the License, or
12 12
  * (at your option) any later version
13 13
  *
14
- * openser is distributed in the hope that it will be useful,
14
+ * Kamailio is distributed in the hope that it will be useful,
15 15
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 16
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 17
  * GNU General Public License for more details.
Browse code

- small doxygen updates (group, syntax), small docs update - patch provided from Olle E. Johansson, closes #2025079

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@4505 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 24/07/2008 15:20:11
Showing 1 changed files
... ...
@@ -24,6 +24,7 @@
24 24
 /**
25 25
  * \file db/db_pool.h
26 26
  * \brief Functions for managing a pool of database connections.
27
+ * \ingroup db
27 28
  */
28 29
 
29 30
 #ifndef _DB_POOL_H
Browse code

further cleanups in core database API - move use_table and close function for SQL DBs to core - move query, raw_query, insert, update, delete functions for SQL DBs to core - all this functions were almost identical implemented in the three DB, this functions uses now a function pointer based interface to do the work - the use_table functions from dbtext and db_berkeley uses also now the core API - move result management function from db_col to db_res to the other result management functions, they are not useful alone - change postgres module to match more the structure of mysql and unixodbc, remove the 'PARANOID' #define, the other modules don't have this and prefix all functions with db_postgres, make this more consistent to mysql module - prefix all functions in unixodbc module with db_unixodbc, make this consistent to the other modules, cleanup the namespace - prefix val2str function in mysql with db_mysql too - move the SQL_BUF_LENGTH to core API, all modules need this - remove the static SQL char buffer from postgres and unixodbc, uses the one provided from the core API - move documentation from db/doc to API files in doxygen format - improve and extend documentation for the whole API - make database API const correct, to guard against implementation errors and allow better compiler optimizations - change interface free_connection function in SQL DBs to connection structure to allow the usage of core API do_close - fix indention for postgres driver and make logging messages consistent - remove now unneeded system header includes for SQL DBs - remove transaction related code from postgres driver, this is not used at all and according to Klaus also brings no performance benefit if used. - probably some other smaller cleanups

Tested with the testcases, so basic functionality should work.. Please test! :-)


git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@3506 689a6050-402a-0410-94f2-e92a70836424

Henning Westerholt authored on 07/01/2008 14:26:27
Showing 1 changed files
... ...
@@ -2,6 +2,7 @@
2 2
  * $Id$
3 3
  *
4 4
  * Copyright (C) 2001-2005 iptel.org
5
+ * Copyright (C) 2007-2008 1&1 Internet AG
5 6
  *
6 7
  * This file is part of openser, a free SIP server.
7 8
  *
... ...
@@ -20,6 +21,11 @@
20 21
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 22
  */
22 23
 
24
+/**
25
+ * \file db/db_pool.h
26
+ * \brief Functions for managing a pool of database connections.
27
+ */
28
+
23 29
 #ifndef _DB_POOL_H
24 30
 #define _DB_POOL_H
25 31
 
... ...
@@ -27,7 +33,7 @@
27 33
 #include "db_con.h"
28 34
 
29 35
 
30
-/*
36
+/**
31 37
  * This is a stub that contains all attributes
32 38
  * that pool members must have, it is not really
33 39
  * used, real connection structures are created
... ...
@@ -36,28 +42,30 @@
36 42
  * attributes.
37 43
  */
38 44
 struct pool_con {
39
-	struct db_id* id;        /* Connection identifier */
40
-	unsigned int ref;        /* Reference count */
41
-	struct pool_con* next;   /* Next element in the pool */
45
+	struct db_id* id;        /**< Connection identifier */
46
+	unsigned int ref;        /**< Reference count */
47
+	struct pool_con* next;   /**< Next element in the pool */
42 48
 };
43 49
 
44 50
 
45
-/*
46
- * Search the pool for a connection with
47
- * the identifier equal to id, NULL is returned
48
- * when no connection is found
51
+/**
52
+ * Search the pool for a connection with the identifier equal to
53
+ * the id.
54
+ * \param id searched id
55
+ * \return the connection if it could be found, NULL otherwise
49 56
  */
50
-struct pool_con* pool_get(struct db_id* id);
57
+struct pool_con* pool_get(const struct db_id* id);
51 58
 
52 59
 
53
-/*
54
- * Insert a new connection into the pool
60
+/**
61
+ * Insert a new connection into the pool.
62
+ * \param con the inserted connection 
55 63
  */
56 64
 void pool_insert(struct pool_con* con);
57 65
 
58 66
 
59
-/*
60
- * Release connection from the pool, the function
67
+/**
68
+ * Release a connection from the pool, the function
61 69
  * would return 1 when if the connection is not
62 70
  * referenced anymore and thus can be closed and
63 71
  * deleted by the backend. The function returns
... ...
@@ -65,6 +73,8 @@ void pool_insert(struct pool_con* con);
65 73
  * because some other module is still using it.
66 74
  * The function returns -1 if the connection is
67 75
  * not in the pool.
76
+ * \param con connection that should be removed
77
+ * \return 1 if the connection can be freed, 0 if it can't be freed, -1 if not found
68 78
  */
69 79
 int pool_remove(struct pool_con* con);
70 80
 
Browse code

- mergin with ser cvs head

git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@29 689a6050-402a-0410-94f2-e92a70836424

Daniel-Constantin Mierla authored on 16/06/2005 12:07:08
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,72 @@
1
+/* 
2
+ * $Id$
3
+ *
4
+ * Copyright (C) 2001-2005 iptel.org
5
+ *
6
+ * This file is part of openser, a free SIP server.
7
+ *
8
+ * openser 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
+ * openser is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License 
19
+ * along with this program; if not, write to the Free Software 
20
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21
+ */
22
+
23
+#ifndef _DB_POOL_H
24
+#define _DB_POOL_H
25
+
26
+#include "db_id.h"
27
+#include "db_con.h"
28
+
29
+
30
+/*
31
+ * This is a stub that contains all attributes
32
+ * that pool members must have, it is not really
33
+ * used, real connection structures are created
34
+ * by database backends. All such structures (
35
+ * created by the backends) must have these
36
+ * attributes.
37
+ */
38
+struct pool_con {
39
+	struct db_id* id;        /* Connection identifier */
40
+	unsigned int ref;        /* Reference count */
41
+	struct pool_con* next;   /* Next element in the pool */
42
+};
43
+
44
+
45
+/*
46
+ * Search the pool for a connection with
47
+ * the identifier equal to id, NULL is returned
48
+ * when no connection is found
49
+ */
50
+struct pool_con* pool_get(struct db_id* id);
51
+
52
+
53
+/*
54
+ * Insert a new connection into the pool
55
+ */
56
+void pool_insert(struct pool_con* con);
57
+
58
+
59
+/*
60
+ * Release connection from the pool, the function
61
+ * would return 1 when if the connection is not
62
+ * referenced anymore and thus can be closed and
63
+ * deleted by the backend. The function returns
64
+ * 0 if the connection should still be kept open
65
+ * because some other module is still using it.
66
+ * The function returns -1 if the connection is
67
+ * not in the pool.
68
+ */
69
+int pool_remove(struct pool_con* con);
70
+
71
+
72
+#endif /* _POOL_H */