Module: sip-router
Branch: master
Commit: b4e8f3f4c09b57ce6f60f542963a80b79fc0205b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b4e8f3f…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Thu Aug 14 10:48:16 2014 +0200
modules/ims_qos: Do not add MCD AVP to AAR if src or dst ports are 0
Check if src or dst ports in SDP are 0 and if so do not add an MCD AVP for this
---
modules/ims_qos/rx_aar.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/modules/ims_qos/rx_aar.c b/modules/ims_qos/rx_aar.c
index 5196d99..463845a 100644
--- a/modules/ims_qos/rx_aar.c
+++ b/modules/ims_qos/rx_aar.c
@@ -380,12 +380,17 @@ int add_media_components(AAAMessage* aar, struct sip_msg *req,
//is this a stream to add to AAR.
if (req_sdp_stream->is_rtp) {
- rx_add_media_component_description_avp(aar, sdp_stream_num + 1,
- &req_sdp_stream->media, &req_sdp_session->ip_addr,
- &req_sdp_stream->port, &rpl_sdp_session->ip_addr,
- &rpl_sdp_stream->port, &rpl_sdp_stream->transport,
- &req_sdp_stream->raw_stream,
- &rpl_sdp_stream->raw_stream, direction);
+ //check if the src or dst port is 0 and if so then don't add to rx
+ int intportA = atoi(req_sdp_stream->port.s);
+ int intportB = atoi(rpl_sdp_stream->port.s);
+ if(intportA != 0 && intportB != 0){
+ rx_add_media_component_description_avp(aar, sdp_stream_num + 1,
+ &req_sdp_stream->media, &req_sdp_session->ip_addr,
+ &req_sdp_stream->port, &rpl_sdp_session->ip_addr,
+ &rpl_sdp_stream->port, &rpl_sdp_stream->transport,
+ &req_sdp_stream->raw_stream,
+ &rpl_sdp_stream->raw_stream, direction);
+ }
}
sdp_stream_num++;
}
Module: sip-router
Branch: master
Commit: f44dad86621685cf7fde45e4ad36f0f0bbcfb15a
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f44dad8…
Author: Richard Good <richard.good(a)smilecoms.com>
Committer: Richard Good <richard.good(a)smilecoms.com>
Date: Thu Aug 14 10:46:59 2014 +0200
modules/ims_qos: Support Rx_AAR on AAR update
Previously if Rx_AAR was called for an AAR update the function returned true
Now this function gets the previous Rx session and sends an AAR update
---
modules/ims_qos/mod.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/modules/ims_qos/mod.c b/modules/ims_qos/mod.c
index c3d8d81..e87af76 100644
--- a/modules/ims_qos/mod.c
+++ b/modules/ims_qos/mod.c
@@ -552,10 +552,7 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* str1, char* bar) {
LM_DBG("Attached CDP auth session [%.*s] for Rx to dialog in %s mode\n", auth_session->id.len, auth_session->id.s, direction);
} else {
LM_DBG("Update AAR session for this dialog in mode %s\n", direction);
- if (saved_t_data)
- free_saved_transaction_global_data(saved_t_data); //only free global data if no AARs were sent. if one was sent we have to rely on the callback (CDP) to free
- create_return_code(CSCF_RETURN_TRUE);
- return CSCF_RETURN_TRUE;
+ auth_session = cdpb.AAAGetAuthSession(*rx_session_id);
}
LM_DBG("Suspending SIP TM transaction\n");
Hi,
I have noticed that in some instances if you update a row in mysql via the
mysql_db module and the actual row data does not change - affected_rows
will return 0. This is the default behaviour for the mysql API as per -
http://dev.mysql.com/doc/refman/5.0/en/mysql-real-connect.html
There is a flag (CLIENT_FOUND_ROWS) that can be used in the
mysql_real_connect function that will cause affected_rows to return the
number of rows that were "matched" - ie in the WHERE clause, as opposed to
whether or not any data was changed.
If we don't it could be a problem for modules like usrloc where an update
is done and if no row are "affected" and new row is added which would cause
a duplicate.
I understand that updating a row with zero changes is not ideal and prob.
not a typical use case but this IMO is irrelevant. I understand affected
rows to mean the number of rows that were matched and not the number of
rows that had data changed... - seems like a case of MySQL being too clever
here ;)
Thoughts?
Cheers
Jason