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

Daniel-Constantin Mierla notifications at github.com
Mon Oct 15 13:25:27 CEST 2018


miconda commented on this pull request.



> @@ -464,7 +463,15 @@ static inline void acc_onreply_in(struct cell *t, struct sip_msg *req,
 	}
 }
 
-
+static void reset_acc_flags(struct sip_msg *req, int flags_to_reset) {
+	int x;
+	for (x=0;x<32;x++) {
+		if (flags_to_reset & 1<<x) {
+			resetflag(req, x);
+			LM_DBG("reset[%d]\n", x);
+		}
+	}
+}

Instead of `reset_acc_flags()` which does a loop 0..31, I would rather add a helper core function to reset the msg flags with a bitmask (in addition of reseting only one), because the operation should be just:

```
msg->flags &= ~flags_to_reset;
```

-- 
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#pullrequestreview-164659282
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20181015/9c3ffa4e/attachment.html>


More information about the sr-dev mailing list