Module: sip-router
Branch: 4.0
Commit: 0e7d000a9c73b0fd06132e458f838cc78abddbed
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0e7d000a9c73b0fd06132e458f838cc78abddbed

Author: Vicente Hernando <[email protected]>
Committer: Vicente Hernando <[email protected]>
Date:   Mon Apr  8 11:47:51 2013 +0200

modules/ndb_redis: b/f restore correctly last char in argument strings.

---

 modules/ndb_redis/ndb_redis_mod.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/modules/ndb_redis/ndb_redis_mod.c 
b/modules/ndb_redis/ndb_redis_mod.c
index ecce4e9..2cca4dd 100644
--- a/modules/ndb_redis/ndb_redis_mod.c
+++ b/modules/ndb_redis/ndb_redis_mod.c
@@ -248,12 +248,12 @@ static int w_redis_cmd5(struct sip_msg* msg, char* ssrv, 
char* scmd,
        arg1.s[arg1.len] = '\0';
        arg2.s[arg2.len] = '\0';
        if(redisc_exec(&s[0], &s[2], &s[1], arg1.s, arg2.s)<0) {
-               c1 = arg1.s[arg1.len];
-               c2 = arg2.s[arg2.len];
+               arg1.s[arg1.len] = c1;
+               arg2.s[arg2.len] = c2;
                return -1;
        }
-       c1 = arg1.s[arg1.len];
-       c2 = arg2.s[arg2.len];
+       arg1.s[arg1.len] = c1;
+       arg2.s[arg2.len] = c2;
        return 1;
 }
 
@@ -305,14 +305,14 @@ static int w_redis_cmd6(struct sip_msg* msg, char* ssrv, 
char* scmd,
        arg2.s[arg2.len] = '\0';
        arg3.s[arg3.len] = '\0';
        if(redisc_exec(&s[0], &s[2], &s[1], arg1.s, arg2.s, arg3.s)<0) {
-               c1 = arg1.s[arg1.len];
-               c2 = arg2.s[arg2.len];
-               c3 = arg3.s[arg3.len];
+               arg1.s[arg1.len] = c1;
+               arg2.s[arg2.len] = c2;
+               arg3.s[arg3.len] = c3;
                return -1;
        }
-       c1 = arg1.s[arg1.len];
-       c2 = arg2.s[arg2.len];
-       c3 = arg3.s[arg3.len];
+       arg1.s[arg1.len] = c1;
+       arg2.s[arg2.len] = c2;
+       arg3.s[arg3.len] = c3;
        return 1;
 }
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to