Browse code

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

Daniel-Constantin Mierla authored on 17/11/2011 23:08:44
Showing 2 changed files
... ...
@@ -260,6 +260,7 @@ typedef struct msg_body {
260 260
 /*! \brief The SIP message */
261 261
 typedef struct sip_msg {
262 262
 	unsigned int id;               /*!< message id, unique/process*/
263
+	int pid;                       /*!< process id */
263 264
 	snd_flags_t fwd_send_flags;    /*!< send flags for forwarding */
264 265
 	snd_flags_t rpl_send_flags;    /*!< send flags for replies */
265 266
 	struct msg_start first_line;   /*!< Message first line */
... ...
@@ -135,6 +135,7 @@ int receive_msg(char* buf, unsigned int len, struct receive_info* rcv_info)
135 135
 	/* buf[len]=0; */ /* WARNING: zero term removed! */
136 136
 	msg->rcv=*rcv_info;
137 137
 	msg->id=msg_no;
138
+	msg->pid=my_pid();
138 139
 	msg->set_global_address=default_global_address;
139 140
 	msg->set_global_port=default_global_port;
140 141