redis / hiredis

Minimalistic C client for Redis >= 1.2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

After changing the hiredis part in the redis source code and compiling it, when I used redis-cli for packet capture inspection, I didn't see the changes I changed.

MasterL-min opened this issue · comments

6F8~KL1CGMJ_CHI@A6FYVVU
I made changes to hiredis.c in the hiredis folder in the redis source code, as shown in the picture.
The changed function is redisvFormatCommand in hiredis.c.
Change as follows
P 6ZZ(8 $066SU43Q%9~54
I want to add an extra character such as 'b' when hiredis adds /r/n after the parameters passed in by the user.
but when I make changes to this and save and compile(ps,the way I compile is to use the command sudo make under the hiredis folder of the redis source code).
When I capture the package, I can't see the changes I made. The content of the package I captured is as follows:
G$5E9LA9S JDT}J@)IU~6
And this is consistent with the contents of the package without changes, so I wonder what is wrong.

This issue might fit better under the redis repo, but it sound like you would need to rebuild redis after rebuilding its dependency hiredis. Hiredis is built as a static library and the changes needs to be linked into the redis binary as well.
You can always run make distclean all under the redis repo to make sure everything is rebuilt. Slow but thorough.

Going to close this since it's not really a hiredis issue.

But the advice of doing distclean all in the Redis source tree is good. Another quick and dirty way to make sure Redis is recompiling your changed hiredis dep is to intentionally create a syntax error in hiredis and rebuild. If it doesn't error out, you know it's not being rebuilt for whatever reason. Hopefully the make distclean works though. 😄