TT#63000 fix SSCAN using empty key name

Change-Id: Ifd294f135e6f05ab0b356d4ca0de6adde54bf777
(cherry picked from commit c182f411d8)
mr7.5.8
Richard Fuchs 5 years ago
parent d205b85e92
commit e407530223

@ -60,3 +60,4 @@ upstream/ndb_redis-set-message-level-to-debug-on-exec.patch
sipwise/db_redis_skip_empty_keys.patch
sipwise/db_redis_graceful_scan.patch
sipwise/db_redis_sscan.patch
sipwise/db_redis_sscan_fix_empty_key.patch

@ -0,0 +1,11 @@
--- a/src/modules/db_redis/redis_dbase.c
+++ b/src/modules/db_redis/redis_dbase.c
@@ -784,7 +784,7 @@
do {
snprintf(cursor_str, sizeof(cursor_str), "%lu", cursor);
- if (!index_key) {
+ if (!index_key || !index_key->len) {
if (db_redis_key_add_string(&query_v, "SCAN", 4) != 0) {
LM_ERR("Failed to add scan command to scan query\n");
goto err;
Loading…
Cancel
Save