[sr-dev] [kamailio/kamailio] acc: generating duplicates (#1674)

Henning Westerholt notifications at github.com
Fri Oct 12 13:34:16 CEST 2018


Hello Julien, thank you for this request.

So did I understood it correctly, you want to unify the flag manipulation and also fix some bugs this way? It is probably better to not combine this two changes. If you change different modules, these changes should be also in individual commits, if they are not interdependent on each other.

I had a quick look to the patch.

-			if((type==1) && (msg->flags&(e->missed_flag))) {
+			if((type==1) && isflagset(msg, e->missed_flag) == 1) {

This should be identically, according to the definition of isflagset. I don't see any big advantage of one format to the other, or I am wrong?

One question about this change (it is represented several times):

-		_acc_diameter_engine.missed_flag = 1<<diameter_missed_flag;
+		_acc_diameter_engine.missed_flag = diameter_missed_flag;

This will not produce identical results, I think. The first one is a left shift of diameter_missed_flag length, and the second one an assignment. Example:

diameter_missed_flag                      = 00000000000000000000000000001000 (8)
_acc_diameter_engine.missed_flag = 00000000000000000000000010000000 (256)

What is your reasoning behind this change?

-- 
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/1674#issuecomment-429295886
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181012/ed80b96e/attachment.html>


More information about the sr-dev mailing list