Author: sayer
Date: 2008-11-05 18:57:22 +0100 (Wed, 05 Nov 2008)
New Revision: 1125
Modified:
trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp
trunk/core/plug-in/sipctrl/trans_layer.cpp
trunk/core/plug-in/sipctrl/trans_layer.h
Log:
applying sipctrl_transaction_id_64bit.patch: transaction matching failed on 64
bit system due to limited serKey length
Modified: trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp
===================================================================
--- trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp 2008-11-05 17:36:35 UTC
(rev 1124)
+++ trunk/core/plug-in/sipctrl/SipCtrlInterface.cpp 2008-11-05 17:57:22 UTC
(rev 1125)
@@ -319,10 +319,9 @@
}
}
- int res = tl->send_request(msg,serKey);
+ int res = tl->send_request(msg,serKey,serKeyLen);
delete msg;
- serKeyLen=12;
return res;
}
@@ -518,8 +517,10 @@
}
}
else {
- WARN("Request has no contact header\n");
- WARN("\trequest = '%.*s'\n",msg->len,msg->buf);
+ if (req.method == "INVITE") {
+ WARN("Request has no contact header\n");
+ WARN("\trequest = '%.*s'\n",msg->len,msg->buf);
+ }
}
if(req.from_uri.empty()) {
Modified: trunk/core/plug-in/sipctrl/trans_layer.cpp
===================================================================
--- trunk/core/plug-in/sipctrl/trans_layer.cpp 2008-11-05 17:36:35 UTC (rev
1124)
+++ trunk/core/plug-in/sipctrl/trans_layer.cpp 2008-11-05 17:57:22 UTC (rev
1125)
@@ -467,7 +467,7 @@
bucket->remove_trans(t);
}
-int trans_layer::send_request(sip_msg* msg, char* tid)
+int trans_layer::send_request(sip_msg* msg, char* tid, unsigned int& tid_len)
{
// Request-URI
// To
@@ -482,6 +482,8 @@
assert(transport);
+ tid_len = 0;
+
if(set_next_hop(msg->route,msg->u.request->ruri_str,
&msg->remote_ip) < 0){
// TODO: error handling
@@ -587,7 +589,8 @@
string t_id = int2hex(bucket->get_id()).substr(5,string::npos)
+ ":" + long2hex((unsigned long)t);
- memcpy(tid,t_id.c_str(),12);
+ memcpy(tid,t_id.c_str(),t_id.length());
+ tid_len = t_id.length();
}
bucket->unlock();
Modified: trunk/core/plug-in/sipctrl/trans_layer.h
===================================================================
--- trunk/core/plug-in/sipctrl/trans_layer.h 2008-11-05 17:36:35 UTC (rev
1124)
+++ trunk/core/plug-in/sipctrl/trans_layer.h 2008-11-05 17:57:22 UTC (rev
1125)
@@ -139,10 +139,11 @@
* Sends a UAC request.
* Caution: Route headers should not be added to the
* general header list (msg->hdrs).
- * @param msg Pre-built message.
- * @param tid buffer for the transaction key (char[12])
+ * @param [in] msg Pre-built message.
+ * @param [out] tid buffer for the transaction key (char*)
+ * @param [out] length of transaction key
*/
- int send_request(sip_msg* msg, char* tid);
+ int send_request(sip_msg* msg, char* tid, unsigned int& tid_len);
/**
* Cancels a request.
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev