Procházet zdrojové kódy

topos_redis : show redis error for post mortem analysis

(cherry picked from commit 72889e945041b6475a43c371aa4e20e99f5d1240)
Thomas před 1 rokem
rodič
revize
8331cb1f87
1 změnil soubory, kde provedl 9 přidání a 0 odebrání
  1. 9 0
      src/modules/topos_redis/topos_redis_storage.c

+ 9 - 0
src/modules/topos_redis/topos_redis_storage.c

@@ -677,6 +677,9 @@ int tps_redis_load_initial_method_branch(
 
 	if(rrpl->type != REDIS_REPLY_ARRAY) {
 		LM_WARN("invalid redis result type: %d\n", rrpl->type);
+		if(rrpl->type == REDIS_REPLY_ERROR) {
+			LM_ERR("Redis error:%s\n", rrpl->str);
+		}
 		freeReplyObject(rrpl);
 		return -1;
 	}
@@ -832,6 +835,9 @@ int tps_redis_load_branch(
 
 	if(rrpl->type != REDIS_REPLY_ARRAY) {
 		LM_WARN("invalid redis result type: %d\n", rrpl->type);
+		if(rrpl->type == REDIS_REPLY_ERROR) {
+			LM_ERR("Redis error:%s\n", rrpl->str);
+		}
 		freeReplyObject(rrpl);
 		return -1;
 	}
@@ -1037,6 +1043,9 @@ int tps_redis_load_dialog(sip_msg_t *msg, tps_data_t *md, tps_data_t *sd)
 
 	if(rrpl->type != REDIS_REPLY_ARRAY) {
 		LM_WARN("invalid redis result type: %d\n", rrpl->type);
+		if(rrpl->type == REDIS_REPLY_ERROR) {
+			LM_ERR("Redis error:%s\n", rrpl->str);
+		}
 		freeReplyObject(rrpl);
 		return -1;
 	}