Daniel-Constantin Mierla
2021-05-29 13:55:31 UTC
Content preview: Module: kamailio Branch: master Commit: 4e29c23e8b310d111503dee44b6de3aa8f57d2ce
URL: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-05-28T14:55:42+02:00
Content analysis details: (-2.4 points, 5.5 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
Module: kamailio
Branch: master
Commit: 4e29c23e8b310d111503dee44b6de3aa8f57d2ce
URL: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce
Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-05-28T14:55:42+02:00
mtree: number of matched records for tree type=1 stored in pv_count
---
Modified: src/modules/mtree/mtree.c
---
Diff: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce.diff
Patch: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce.patch
---
diff --git a/src/modules/mtree/mtree.c b/src/modules/mtree/mtree.c
index fe4dba1a20..f9b755d4d8 100644
--- a/src/modules/mtree/mtree.c
+++ b/src/modules/mtree/mtree.c
@@ -44,6 +44,7 @@ extern pv_spec_t pv_value;
extern pv_spec_t pv_values;
extern pv_spec_t pv_dstid;
extern pv_spec_t pv_weight;
+extern pv_spec_t pv_count;
extern int _mt_tree_type;
extern int _mt_ignore_duplicates;
extern int _mt_allow_duplicates;
@@ -599,6 +600,13 @@ int mt_match_prefix(struct sip_msg *msg, m_tree_t *it,
add_avp(dstid_name_type, dstid_avp_name, avp_value);
}
}
+ memset(&val, 0, sizeof(pv_value_t));
+ val.flags = PV_VAL_INT;
+ val.ri = n;
+ if(pv_value.setf(msg, &pv_count.pvp, (int)EQ_T, &val)<0) {
+ LM_ERR("setting PV count failed\n");
+ return -2;
+ }
return 0;
}
URL: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-05-28T14:55:42+02:00
Content analysis details: (-2.4 points, 5.5 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
Module: kamailio
Branch: master
Commit: 4e29c23e8b310d111503dee44b6de3aa8f57d2ce
URL: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce
Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-05-28T14:55:42+02:00
mtree: number of matched records for tree type=1 stored in pv_count
---
Modified: src/modules/mtree/mtree.c
---
Diff: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce.diff
Patch: https://github.com/kamailio/kamailio/commit/4e29c23e8b310d111503dee44b6de3aa8f57d2ce.patch
---
diff --git a/src/modules/mtree/mtree.c b/src/modules/mtree/mtree.c
index fe4dba1a20..f9b755d4d8 100644
--- a/src/modules/mtree/mtree.c
+++ b/src/modules/mtree/mtree.c
@@ -44,6 +44,7 @@ extern pv_spec_t pv_value;
extern pv_spec_t pv_values;
extern pv_spec_t pv_dstid;
extern pv_spec_t pv_weight;
+extern pv_spec_t pv_count;
extern int _mt_tree_type;
extern int _mt_ignore_duplicates;
extern int _mt_allow_duplicates;
@@ -599,6 +600,13 @@ int mt_match_prefix(struct sip_msg *msg, m_tree_t *it,
add_avp(dstid_name_type, dstid_avp_name, avp_value);
}
}
+ memset(&val, 0, sizeof(pv_value_t));
+ val.flags = PV_VAL_INT;
+ val.ri = n;
+ if(pv_value.setf(msg, &pv_count.pvp, (int)EQ_T, &val)<0) {
+ LM_ERR("setting PV count failed\n");
+ return -2;
+ }
return 0;
}