Browse code

presence_dialoginfo: use parameter default_expires instead of 3600 constant

- GH #2996

Adrian Tabacioiu authored on 14/01/2022 13:29:42 • Daniel-Constantin Mierla committed on 18/01/2022 19:19:16
Showing 1 changed files
... ...
@@ -43,7 +43,7 @@ int dlginfo_add_events(void)
43 43
 	event.content_type.s = "application/dialog-info+xml";
44 44
 	event.content_type.len = 27;
45 45
 
46
-	event.default_expires= 3600;
46
+	event.default_expires= pres_dlginfo_default_expires;
47 47
 	event.type = PUBL_TYPE;
48 48
 	event.req_auth = 0;
49 49
 	event.evs_publ_handl = 0;
Browse code

presence_dialoginfo: removed svn id, history, coherent indentation

Daniel-Constantin Mierla authored on 24/10/2017 10:38:12
Showing 1 changed files
... ...
@@ -17,13 +17,10 @@
17 17
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 18
  * GNU General Public License for more details.
19 19
  *
20
- * You should have received a copy of the GNU General Public License 
21
- * along with this program; if not, write to the Free Software 
20
+ * You should have received a copy of the GNU General Public License
21
+ * along with this program; if not, write to the Free Software
22 22
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23 23
  *
24
- * History:
25
- * --------
26
- *  2008-08-25  initial version (kd)
27 24
  */
28 25
 
29 26
 #include <stdio.h>
... ...
@@ -36,34 +33,33 @@
36 33
 
37 34
 int dlginfo_add_events(void)
38 35
 {
39
-    pres_ev_t event;
40
-	
41
-    /* constructing message-summary event */
42
-    memset(&event, 0, sizeof(pres_ev_t));
43
-    event.name.s = "dialog";
44
-    event.name.len = 6;
36
+	pres_ev_t event;
45 37
 
46
-    event.content_type.s = "application/dialog-info+xml";
47
-    event.content_type.len = 27;
38
+	/* constructing message-summary event */
39
+	memset(&event, 0, sizeof(pres_ev_t));
40
+	event.name.s = "dialog";
41
+	event.name.len = 6;
42
+
43
+	event.content_type.s = "application/dialog-info+xml";
44
+	event.content_type.len = 27;
48 45
 
49 46
 	event.default_expires= 3600;
50
-    event.type = PUBL_TYPE;
47
+	event.type = PUBL_TYPE;
51 48
 	event.req_auth = 0;
52
-    event.evs_publ_handl = 0;
49
+	event.evs_publ_handl = 0;
53 50
 
54 51
 	/* aggregate XML body and free() fuction */
55
-    event.agg_nbody = dlginfo_agg_nbody;
56
-    event.free_body = free_xml_body;
52
+	event.agg_nbody = dlginfo_agg_nbody;
53
+	event.free_body = free_xml_body;
57 54
 
58 55
 	/* modify XML body for each watcher to set the correct "version" */
59
-    event.aux_body_processing = dlginfo_body_setversion;
60
-    event.aux_free_body = free_xml_body;
56
+	event.aux_body_processing = dlginfo_body_setversion;
57
+	event.aux_free_body = free_xml_body;
61 58
 
62
-	
63
-    if (pres_add_event(&event) < 0) {
59
+	if (pres_add_event(&event) < 0) {
64 60
 		LM_ERR("failed to add event \"dialog\"\n");
65 61
 		return -1;
66
-    }		
67
-	
68
-    return 0;
62
+	}
63
+
64
+	return 0;
69 65
 }
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
... ...
@@ -29,7 +29,7 @@
29 29
 #include <stdio.h>
30 30
 #include <stdlib.h>
31 31
 #include <string.h>
32
-#include "../../parser/parse_content.h"
32
+#include "../../core/parser/parse_content.h"
33 33
 #include "../presence/event_list.h"
34 34
 #include "presence_dialoginfo.h"
35 35
 #include "notify_body.h"
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,69 @@
1
+/*
2
+ * Add "message-summary" event to presence module
3
+ * Add "dialog" event to presence module
4
+ *
5
+ * Copyright (C) 2007 Juha Heinanen
6
+ * Copyright (C) 2008 Klaus Darilion, IPCom
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
11
+ * it under the terms of the GNU General Public License as published by
12
+ * the Free Software Foundation; either version 2 of the License, or
13
+ * (at your option) any later version
14
+ *
15
+ * Kamailio is distributed in the hope that it will be useful,
16
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
+ * GNU General Public License for more details.
19
+ *
20
+ * You should have received a copy of the GNU General Public License 
21
+ * along with this program; if not, write to the Free Software 
22
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
23
+ *
24
+ * History:
25
+ * --------
26
+ *  2008-08-25  initial version (kd)
27
+ */
28
+
29
+#include <stdio.h>
30
+#include <stdlib.h>
31
+#include <string.h>
32
+#include "../../parser/parse_content.h"
33
+#include "../presence/event_list.h"
34
+#include "presence_dialoginfo.h"
35
+#include "notify_body.h"
36
+
37
+int dlginfo_add_events(void)
38
+{
39
+    pres_ev_t event;
40
+	
41
+    /* constructing message-summary event */
42
+    memset(&event, 0, sizeof(pres_ev_t));
43
+    event.name.s = "dialog";
44
+    event.name.len = 6;
45
+
46
+    event.content_type.s = "application/dialog-info+xml";
47
+    event.content_type.len = 27;
48
+
49
+	event.default_expires= 3600;
50
+    event.type = PUBL_TYPE;
51
+	event.req_auth = 0;
52
+    event.evs_publ_handl = 0;
53
+
54
+	/* aggregate XML body and free() fuction */
55
+    event.agg_nbody = dlginfo_agg_nbody;
56
+    event.free_body = free_xml_body;
57
+
58
+	/* modify XML body for each watcher to set the correct "version" */
59
+    event.aux_body_processing = dlginfo_body_setversion;
60
+    event.aux_free_body = free_xml_body;
61
+
62
+	
63
+    if (pres_add_event(&event) < 0) {
64
+		LM_ERR("failed to add event \"dialog\"\n");
65
+		return -1;
66
+    }		
67
+	
68
+    return 0;
69
+}