Module: sip-router
Branch: master
Commit: 76f7847fe6245e06aa88d104b60245c7c03b04f0
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=76f7847…
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
---
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 7f18eb1..31582f5 100644
--- a/parser/msg_parser.h
+++ b/parser/msg_parser.h
@@ -260,6 +260,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 183d03b..c701dd8 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;