Re: [sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-05-07 Thread Victor Seva
Closed #2300 via d00b14704805d728f5a845a6af900eff1ed372ac. -- 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/issues/2300#event-3312384294___

Re: [sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-04-28 Thread Victor Seva
both are using the same library from buster: `libhiredis-dev 0.14.0-3` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-04-28 Thread Daniel-Constantin Mierla
First I was not sure that you report the redis_cmd() is not returning false (negative) in such case, or the `type` field has the wrong value. Then we use the same hiredis function to get the response: ``` rpl->rplRedis = redisvCommand(rsrv->ctxRedis, cmd->s, ap ); ``` Strange that gets

Re: [sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-04-28 Thread Victor Seva
I will try to explain, "HSET dd field" is missing the value parameter and it's a faulty command, it must fail. `redis_cmd()` doesn't return <0 so there was no error 0_0 ( reply->type 3, INTEGER ) My simple code test fails as expected ( reply->type 6, ERROR ) -- You are receiving this

Re: [sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-04-28 Thread Victor Seva
I would say our code is doing something wrong since the same command using redisvCommand() in my simple test code works as expected, returning an error reply type not an integer. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on

Re: [sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-04-27 Thread Daniel-Constantin Mierla
I don't get exactly what you report here: is a problem with the kamailio code or a strange value for type field in the redis reply. Because that redis reply structure is what redisvCommand() returns. Any further details about the issue itself? -- You are receiving this because you are

[sr-dev] [kamailio/kamailio] ndb_redis: redis_cmd() doesn't return error with a faulty command (#2300)

2020-04-24 Thread Victor Seva
### Description Detected that a command like this was not returning <0 ``` if(redis_cmd("test", "HSET dd field1", "r")) { [...] } ``` Same command on redis-cli: ``` # redis-cli 127.0.0.1:6379> HSET dd field1 (error) ERR wrong number of arguments for 'hset' command ``` ### Troubleshooting