Module: sip-router
Branch: 3.1
Commit: 0e3d771e8085f61289367eddcd5e2defaf5e6a16
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0e3d771…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Fri Nov 18 00:08:44 2011 +0100
core: store pid per sip message
- when a sip message is received, store pid in sip_msg_t structure
- help identifying same sip msg across many processes
(cherry picked from commit 76f7847fe6245e06aa88d104b60245c7c03b04f0)
(cherry picked from commit 4eadcbaa1db1157ad7b967b7177200a937696891)
---
parser/msg_parser.h | 1 +
receive.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/parser/msg_parser.h b/parser/msg_parser.h
index 8ef60ca..5662b7e 100644
--- a/parser/msg_parser.h
+++ b/parser/msg_parser.h
@@ -257,6 +257,7 @@ typedef struct msg_body {
/*! \brief The SIP message */
typedef struct sip_msg {
unsigned int id; /*!< message id, unique/process*/
+ int pid; /*!< process id */
snd_flags_t fwd_send_flags; /*!< send flags for forwarding */
snd_flags_t rpl_send_flags; /*!< send flags for replies */
struct msg_start first_line; /*!< Message first line */
diff --git a/receive.c b/receive.c
index 7f49fdc..60e1f65 100644
--- a/receive.c
+++ b/receive.c
@@ -135,6 +135,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info*
rcv_info)
/* buf[len]=0; */ /* WARNING: zero term removed! */
msg->rcv=*rcv_info;
msg->id=msg_no;
+ msg->pid=my_pid();
msg->set_global_address=default_global_address;
msg->set_global_port=default_global_port;