[sr-dev] git:master: xcap_server: init etag variable for PUT operations

Daniel-Constantin Mierla miconda at gmail.com
Sat Apr 13 11:34:34 CEST 2013


Module: sip-router
Branch: master
Commit: 2d27dd1080cd490e93646b38d3912dcbe3761ca5
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2d27dd1080cd490e93646b38d3912dcbe3761ca5

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Sat Apr 13 11:26:48 2013 +0200

xcap_server: init etag variable for PUT operations

- the function xcaps_get_db_etag() may not found a record to db and will
  not initialize it, resulting in bogus value passed to
  check_preconditions()
- reported by Juha Heinanen, FS#283

---

 modules/xcap_server/xcap_server.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/xcap_server/xcap_server.c b/modules/xcap_server/xcap_server.c
index 24e3269..8bc14eb 100644
--- a/modules/xcap_server/xcap_server.c
+++ b/modules/xcap_server/xcap_server.c
@@ -506,8 +506,8 @@ static int w_xcaps_put(sip_msg_t* msg, char* puri, char* ppath,
 	str uri;
 	str path;
 	str body = {0, 0};
-	str etag;
-	str etag_hdr;
+	str etag = {0, 0};
+	str etag_hdr = {0, 0};
 	str tbuf;
 	str nbuf = {0, 0};
 	str allow = {0, 0};
@@ -1069,7 +1069,7 @@ static int w_xcaps_get(sip_msg_t* msg, char* puri, char* ppath)
 	struct sip_uri turi;
 	str uri;
 	str path;
-	str etag;
+	str etag = {0, 0};
 	str body;
 	int ret = 0;
 	xcap_uri_t xuri;




More information about the sr-dev mailing list