Module: sip-router
Branch: master
Commit: 3f0f60d22d5577965b50821b1c7d0835c898c3f9
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3f0f60d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jan 6 15:28:28 2013 +0100
sl: fix compilation warnings in sl_forward_reply()
- reported by Juha Heinanen
---
modules/sl/sl.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/sl/sl.c b/modules/sl/sl.c
index 6d05569..925d98e 100644
--- a/modules/sl/sl.c
+++ b/modules/sl/sl.c
@@ -393,12 +393,12 @@ static int w_sl_forward_reply(sip_msg_t* msg, str* code, str*
reason)
LM_ERR("invalid reply reason value\n");
return -1;
}
+ /* backup old values */
+ oldscode[0] = msg->first_line.u.reply.status.s[0];
+ oldscode[1] = msg->first_line.u.reply.status.s[1];
+ oldscode[2] = msg->first_line.u.reply.status.s[2];
+ oldncode = msg->first_line.u.reply.statuscode;
if(code!=NULL) {
- /* backup old values */
- oldscode[0] = msg->first_line.u.reply.status.s[0];
- oldscode[1] = msg->first_line.u.reply.status.s[1];
- oldscode[2] = msg->first_line.u.reply.status.s[2];
- oldncode = msg->first_line.u.reply.statuscode;
/* update status code directly in msg buffer */
msg->first_line.u.reply.statuscode = (code->s[0]-'0')*100
+ (code->s[1]-'0')*10 + code->s[2]-'0';