Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

credis_set bug #50

Open
GoogleCodeExporter opened this issue Nov 3, 2015 · 0 comments
Open

credis_set bug #50

GoogleCodeExporter opened this issue Nov 3, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.call credis_set
2.provide fh, key and value args to the function

What is the expected output? What do you see instead?
KEY should be set to VALUE
Instead it gets set to sizeof(VALUE) of the provided VALUE e.g. 5 in case of 
KEY "hello".

What version of the product are you using? On what operating system?
credis 0.2.3 with redis 2.4.17 on RHEL 6.3 x86_64

Please provide any additional information below.
The attached test-client.c is compiled with the following line:
gcc -g -O2 -Wall -DPRINTDEBUG credis.c test-client.c -o test-client

Uppon executing the client, debug shows:

credis_connect() @ 768: Connected to Redis version: 2.4.17

cr_sendandreceive() @ 602: Sending message: len=21, data=SET abra 7
kadabra

cr_readln() @ 423: received 37 bytes: +OK
-ERR unknown command 'kadabra'

I'm guessing it's a parse string issue, since debug shows:
data=SET abra <val lenght> kadabra
Bbut i'm no C expert.

Checking the result with the redis_cli tool:

./redis-cli GET abra
"7"

Original issue reported on code.google.com by sir.man...@gmail.com on 24 Sep 2012 at 7:18

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant