Re: [sr-dev] [kamailio/kamailio] rtpengine: Delete flags & delete handling improvement (#1103)

2017-05-04 Thread Richard Fuchs
Closed #1103 via e69579bca5b0e08187481f228e621ece0d1b79d5.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1103#event-1069187725___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] rtpengine: Delete flags & delete handling improvement (#1103)

2017-05-04 Thread hdikme
@hdikme pushed 1 commit.

50e56a2  rtpengine: Delete flags & delete handling improvement


-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/kamailio/kamailio/pull/1103/files/3155cf5aced56757506174fd9c018930eba14b64..50e56a2ce5c111a17f96172d386d31fa709ad32b
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] rtpengine: Delete flags & delete handling improvement (#1103)

2017-05-02 Thread hdikme
Thank you, i will make the changes by taking your comments into account.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1103#issuecomment-298602842___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] rtpengine: Delete flags & delete handling improvement (#1103)

2017-04-28 Thread Richard Fuchs
rfuchs requested changes on this pull request.

Couple of suggestions on how to improve the flow of logic here. You can leave 
them unchanged if you prefer, then I will address them myself afterwards.

However, please do document these changes in `doc/rtpengine_admin.xml`, perhaps 
with an explanation of how they might be useful.

> @@ -1784,6 +1784,8 @@ static int parse_flags(struct ng_flags_parse *ng_flags, 
> struct sip_msg *msg, enu
case 6:
if (str_eq(&key, "to-tag")) {
ng_flags->to = 1;
+   if (val.s && val.len > 0)

If a value is given, you could simply leave `ng_flags->to` alone (as zero) and 
`goto generic`

> @@ -1967,8 +1970,13 @@ static bencode_item_t 
> *rtpp_function_call(bencode_buffer_t *bencbuf, struct sip_
if (ng_flags.rtcp_mux && ng_flags.rtcp_mux->child)
bencode_dictionary_add(ng_flags.dict, "rtcp-mux", 
ng_flags.rtcp_mux);
 
-   bencode_dictionary_add_str(ng_flags.dict, "call-id", &callid);
-
+temp.s = NULL;
+if (!bencode_dictionary_get_str(ng_flags.dict, "call-id", &temp))

You can get rid of the temp variable and the case distinction below by simply 
retrieving the given call ID into `callid`. Otherwise, at the very least please 
rename `temp` to something more meaningful, as there's quite a long distance 
between this and the place where it's actually being used.

Generally though, instead of doing a `_get_str` here, I would prefer 
`parse_flags` to take care of this and update a flag in `ng_flags` to signal 
that a call ID is already present. (Reason is that a dictionary lookup for a 
constructed dictionary reverts to a linear search, and I cringe at linear 
searches. :smile: ) The same applies to the fromtag/totag handling below, which 
can be solved in a similar way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1103#pullrequestreview-35371108___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] rtpengine: Delete flags & delete handling improvement (#1103)

2017-04-28 Thread hdikme
-Extending rtpengine_delete() in order to enable specifying Call-ID, To-Tag and 
From-Tag for timed out dialogs.
-Matching the calls to rtpengine machine correctly.
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1103

-- Commit Summary --

  * rtpengine: Delete flags & delete handling improvement

-- File Changes --

M src/modules/rtpengine/rtpengine.c (28)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1103.patch
https://github.com/kamailio/kamailio/pull/1103.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1103
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev