Browse code

dmq: new function dmq_process_message()

- similar to dmq_handle_message(), but processes the dmq message
immediately, without queuing for special worker processes
- useful for messages that need very short time for processing, like
htable operation, simplifying by no longer cloning request in shared
memory

Daniel-Constantin Mierla authored on 31/03/2021 05:45:03
Showing 1 changed files
... ...
@@ -21,12 +21,19 @@
21 21
  */
22 22
 
23 23
 
24
-#ifndef _MESSAGE_H_
25
-#define _MESSAGE_H_
24
+#ifndef _DMQ_MESSAGE_H_
25
+#define _DMQ_MESSAGE_H_
26
+
27
+int set_reply_body(struct sip_msg *msg, str *body, str *content_type);
26 28
 
27 29
 int w_dmq_handle_message(struct sip_msg *, char *str1, char *str2);
28 30
 int dmq_handle_message(struct sip_msg *, char *str1, char *str2);
29 31
 int ki_dmq_handle_message(sip_msg_t *msg);
30 32
 int ki_dmq_handle_message_rc(sip_msg_t *msg, int returnval);
31 33
 
34
+int w_dmq_process_message(struct sip_msg *, char *str1, char *str2);
35
+int dmq_process_message(struct sip_msg *, char *str1, char *str2);
36
+int ki_dmq_process_message(sip_msg_t *msg);
37
+int ki_dmq_process_message_rc(sip_msg_t *msg, int returnval);
38
+
32 39
 #endif
Browse code

dmq: use module prefix for global variables

- avoid potential conflicts with other globals, given that this module
is used by other modules to perform replication

Daniel-Constantin Mierla authored on 18/05/2020 10:06:05
Showing 1 changed files
... ...
@@ -15,8 +15,8 @@
15 15
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 16
  * GNU General Public License for more details.
17 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 
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 20
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21 21
  */
22 22
 
Browse code

dmq: fixed KEMI export for handle_message() after last commit adding int param

- new function handle_message_rc(...) exported to kemi

Daniel-Constantin Mierla authored on 06/09/2018 17:26:06
Showing 1 changed files
... ...
@@ -26,6 +26,7 @@
26 26
 
27 27
 int w_dmq_handle_message(struct sip_msg *, char *str1, char *str2);
28 28
 int dmq_handle_message(struct sip_msg *, char *str1, char *str2);
29
-int ki_dmq_handle_message(sip_msg_t *msg, int returnval);
29
+int ki_dmq_handle_message(sip_msg_t *msg);
30
+int ki_dmq_handle_message_rc(sip_msg_t *msg, int returnval);
30 31
 
31 32
 #endif
Browse code

dmq: add optional parameter to dmq_handle_message()

Emmanuel Schmidbauer authored on 31/08/2018 18:17:26
Showing 1 changed files
... ...
@@ -24,7 +24,8 @@
24 24
 #ifndef _MESSAGE_H_
25 25
 #define _MESSAGE_H_
26 26
 
27
+int w_dmq_handle_message(struct sip_msg *, char *str1, char *str2);
27 28
 int dmq_handle_message(struct sip_msg *, char *str1, char *str2);
28
-int ki_dmq_handle_message(sip_msg_t *msg);
29
+int ki_dmq_handle_message(sip_msg_t *msg, int returnval);
29 30
 
30 31
 #endif
Browse code

dmq: exported functions to kemi framework

Daniel-Constantin Mierla authored on 05/12/2017 12:19:17
Showing 1 changed files
... ...
@@ -24,6 +24,7 @@
24 24
 #ifndef _MESSAGE_H_
25 25
 #define _MESSAGE_H_
26 26
 
27
-int dmq_handle_message(struct sip_msg*, char* str1, char* str2);
27
+int dmq_handle_message(struct sip_msg *, char *str1, char *str2);
28
+int ki_dmq_handle_message(sip_msg_t *msg);
28 29
 
29 30
 #endif
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,29 @@
1
+/**
2
+ * dmq module - distributed message queue
3
+ *
4
+ * Copyright (C) 2011 Bucur Marius - Ovidiu
5
+ *
6
+ * This file is part of Kamailio, a free SIP server.
7
+ *
8
+ * Kamailio 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
+ * Kamailio 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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
21
+ */
22
+
23
+
24
+#ifndef _MESSAGE_H_
25
+#define _MESSAGE_H_
26
+
27
+int dmq_handle_message(struct sip_msg*, char* str1, char* str2);
28
+
29
+#endif