Browse code

db_postgres: clang format of the code

Daniel-Constantin Mierla authored on 11/10/2017 16:23:19
Showing 1 changed files
... ...
@@ -39,13 +39,14 @@
39 39
 
40 40
 #include <libpq-fe.h>
41 41
 
42
-struct pg_res {
42
+struct pg_res
43
+{
43 44
 	db_drv_t gen;
44
-	PGresult* res;
45
-    int row, rows;
45
+	PGresult *res;
46
+	int row, rows;
46 47
 };
47 48
 
48
-int pg_res(db_res_t* res);
49
+int pg_res(db_res_t *res);
49 50
 
50 51
 /** @} */
51 52
 
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
new file mode 100644
... ...
@@ -0,0 +1,52 @@
1
+/* 
2
+ * PostgreSQL Database Driver for Kamailio
3
+ *
4
+ * Portions Copyright (C) 2001-2003 FhG FOKUS
5
+ * Copyright (C) 2003 August.Net Services, LLC
6
+ * Portions Copyright (C) 2005-2008 iptelorg GmbH
7
+ *
8
+ * This file is part of Kamailio, a free SIP server.
9
+ *
10
+ * Kamailio is free software; you can redistribute it and/or modify it under the
11
+ * terms of the GNU General Public License as published by the Free Software
12
+ * Foundation; either version 2 of the License, or (at your option) any later
13
+ * version
14
+ *
15
+ * Kamailio is distributed in the hope that it will be useful, but WITHOUT ANY
16
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17
+ * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18
+ * details.
19
+ *
20
+ * You should have received a copy of the GNU General Public License along
21
+ * with this program; if not, write to the Free Software Foundation, Inc., 59
22
+ * Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
+ */
24
+
25
+#ifndef _PG_RES_H
26
+#define _PG_RES_H
27
+
28
+/** \addtogroup postgres
29
+ * @{ 
30
+ */
31
+
32
+/** \file
33
+ * Data structures and functions to convert results obtained from PostgreSQL
34
+ * servers.
35
+ */
36
+
37
+#include "../../lib/srdb2/db_drv.h"
38
+#include "../../lib/srdb2/db_res.h"
39
+
40
+#include <libpq-fe.h>
41
+
42
+struct pg_res {
43
+	db_drv_t gen;
44
+	PGresult* res;
45
+    int row, rows;
46
+};
47
+
48
+int pg_res(db_res_t* res);
49
+
50
+/** @} */
51
+
52
+#endif /* _PG_RES_H */