[OpenSIPS-Users] Userblacklist module with mongodb

Liviu Chircu liviu at opensips.org
Wed Jul 29 10:19:19 EST 2020


On 27.07.2020 12:14, ryan embgrets wrote:
> Any pointer?
>
> I am using mongo for other modules and don't want to keep separate 
> database(mysql) for this module only
>
> Ryan.

Hey, Ryan!

Could you please apply the following patch within an OpenSIPS source 
code tree, then rebuild and see if it makes userblacklist happy?  I 
expect it to apply on any OpenSIPS version, really.

git apply <(base64 -d <<EOF
ZGlmZiAtLWdpdCBhL21vZHVsZXMvdXNlcmJsYWNrbGlzdC9kYi5jIGIvbW9kdWxlcy91c2VyYmxh
Y2tsaXN0L2RiLmMKaW5kZXggYzg0OGMzNDczLi4yNjI0YzM2OWYgMTAwNjQ0Ci0tLSBhL21vZHVs
ZXMvdXNlcmJsYWNrbGlzdC9kYi5jCisrKyBiL21vZHVsZXMvdXNlcmJsYWNrbGlzdC9kYi5jCkBA
IC0xMDcsNyArMTA3LDcgQEAgaW50IGRiX2J1aWxkX3VzZXJibF90cmVlKGNvbnN0IHN0ciAqdXNl
cm5hbWUsIGNvbnN0IHN0ciAqZG9tYWluLCBjb25zdCBzdHIgKnRhYmwKIAlpZiAoUkVTX0NPTF9O
KHJlcykgPiAxKSB7CiAJCWZvcihpID0gMDsgaSA8IFJFU19ST1dfTihyZXMpOyBpKyspIHsKIAkJ
CWlmICgoIVJFU19ST1dTKHJlcylbaV0udmFsdWVzWzBdLm51bCkgJiYgKCFSRVNfUk9XUyhyZXMp
W2ldLnZhbHVlc1sxXS5udWwpKSB7Ci0JCQkJaWYgKChSRVNfUk9XUyhyZXMpW2ldLnZhbHVlc1sw
XS50eXBlID09IERCX1NUUklORykgJiYKKwkJCQlpZiAoKFJFU19ST1dTKHJlcylbaV0udmFsdWVz
WzBdLnR5cGUgPT0gREJfU1RSSU5HIHx8IFJFU19ST1dTKHJlcylbaV0udmFsdWVzWzBdLnR5cGUg
PT0gREJfU1RSKSAmJgogCQkJCQkoUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNbMV0udHlwZSA9PSBE
Ql9JTlQpKSB7CiAKIAkJCQkJLyogTE1fREJHKCJpbnNlcnQgaW50byB0cmVlIHByZWZpeCAlcywg
d2hpdGVsaXN0ICVkIiwKQEAgLTE1NCw3ICsxNTQsNyBAQCBpbnQgZGJfcmVsb2FkX3NvdXJjZShj
b25zdCBzdHIgKnRhYmxlLCBzdHJ1Y3QgZHRfbm9kZV90ICpyb290KQogCWlmIChSRVNfQ09MX04o
cmVzKSA+IDEpIHsKIAkJZm9yKGkgPSAwOyBpIDwgUkVTX1JPV19OKHJlcyk7IGkrKykgewogCQkJ
aWYgKCghUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNbMF0ubnVsKSAmJiAoIVJFU19ST1dTKHJlcylb
aV0udmFsdWVzWzFdLm51bCkpIHsKLQkJCQlpZiAoKFJFU19ST1dTKHJlcylbaV0udmFsdWVzWzBd
LnR5cGUgPT0gREJfU1RSSU5HKSAmJgorCQkJCWlmICgoUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNb
MF0udHlwZSA9PSBEQl9TVFJJTkcgfHwgUkVTX1JPV1MocmVzKVtpXS52YWx1ZXNbMF0udHlwZSA9
PSBEQl9TVFIpICYmCiAJCQkJCShSRVNfUk9XUyhyZXMpW2ldLnZhbHVlc1sxXS50eXBlID09IERC
X0lOVCkpIHsKIAogCQkJCQkvKiBMTV9EQkcoImluc2VydCBpbnRvIHRyZWUgcHJlZml4ICVzLCB3
aGl0ZWxpc3QgJWQiLAo=
EOF
)

Cheers,

-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit 2020 Distributed
   www.opensips.org/events/Summit-2020Distributed




More information about the Users mailing list