Browse code

jansson: Add en-/decode to/from xavp

Nested objects/arrays are not supported with the exception of decoding a
root array with only objects as items to multiple xavps.

Alex Hermann authored on 03/03/2017 14:39:42
Showing 1 changed files
... ...
@@ -27,8 +27,10 @@
27 27
 
28 28
 #include "../../core/sr_module.h"
29 29
 #include "../../core/lvalue.h"
30
+#include "../../core/xavp.h"
30 31
 
31 32
 typedef int (*jansson_to_val_f)(pv_value_t* val, char** freeme, json_t* v);
32 33
 int jansson_to_val(pv_value_t* val, char** freeme, json_t* v);
34
+int jansson_to_xval(sr_xval_t *val, char** freeme, json_t* v);
33 35
 
34 36
 #endif
Browse code

core, lib, modules: updated include paths for header files

Daniel-Constantin Mierla authored on 07/12/2016 11:07:22
Showing 1 changed files
... ...
@@ -25,8 +25,8 @@
25 25
 
26 26
 #include <jansson.h>
27 27
 
28
-#include "../../sr_module.h"
29
-#include "../../lvalue.h"
28
+#include "../../core/sr_module.h"
29
+#include "../../core/lvalue.h"
30 30
 
31 31
 typedef int (*jansson_to_val_f)(pv_value_t* val, char** freeme, json_t* v);
32 32
 int jansson_to_val(pv_value_t* val, char** freeme, json_t* v);
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,34 @@
1
+/**
2
+ * Copyright (C) 2013 Flowroute LLC (flowroute.com)
3
+ *
4
+ * This file is part of Kamailio, a free SIP server.
5
+ *
6
+ * This file is free software; you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation; either version 2 of the License, or
9
+ * (at your option) any later version
10
+ *
11
+ *
12
+ * This file 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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
+ *
21
+ */
22
+
23
+#ifndef _JANSSON_UTILS_H_
24
+#define _JANSSON_UTILS_H_
25
+
26
+#include <jansson.h>
27
+
28
+#include "../../sr_module.h"
29
+#include "../../lvalue.h"
30
+
31
+typedef int (*jansson_to_val_f)(pv_value_t* val, char** freeme, json_t* v);
32
+int jansson_to_val(pv_value_t* val, char** freeme, json_t* v);
33
+
34
+#endif