[sr-dev] git:master: modules_k/xcap_server: Fix to handling of pidf-manipulation documents

Peter Dunkley peter.dunkley at crocodile-rcs.com
Wed Apr 4 18:09:03 CEST 2012


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

Author: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Committer: Peter Dunkley <peter.dunkley at crocodile-rcs.com>
Date:   Wed Apr  4 17:08:40 2012 +0100

modules_k/xcap_server: Fix to handling of pidf-manipulation documents

---

 modules_k/xcap_server/xcap_server.c |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c
index 9580e53..ff25967 100644
--- a/modules_k/xcap_server/xcap_server.c
+++ b/modules_k/xcap_server/xcap_server.c
@@ -460,23 +460,24 @@ error:
 	return -1;
 }
 
-static str xcaps_str_empty      = {"", 0};
-static str xcaps_str_ok         = {"OK", 2};
-static str xcaps_str_srverr     = {"Server error", 12};
-static str xcaps_str_notfound   = {"Not found", 9};
-static str xcaps_str_precon		= {"Precondition Failed", 19};
-static str xcaps_str_notmod		= {"Not Modified", 12};
-static str xcaps_str_appxml     = {"application/xml", 15};
-static str xcaps_str_apprlxml   = {"application/resource-lists+xml", 30};
-static str xcaps_str_apprsxml   = {"application/rls-services+xml", 28};
+static str xcaps_str_empty	= {"", 0};
+static str xcaps_str_ok		= {"OK", 2};
+static str xcaps_str_srverr	= {"Server error", 12};
+static str xcaps_str_notfound	= {"Not found", 9};
+static str xcaps_str_precon	= {"Precondition Failed", 19};
+static str xcaps_str_notmod	= {"Not Modified", 12};
+static str xcaps_str_appxml	= {"application/xml", 15};
+static str xcaps_str_apprlxml	= {"application/resource-lists+xml", 30};
+static str xcaps_str_apprsxml	= {"application/rls-services+xml", 28};
 #if 0
-static str xcaps_str_nocontent  = {"No content", 10};
-static str xcaps_str_appxcxml   = {"application/xcap-caps+xml", 25};
+static str xcaps_str_nocontent	= {"No content", 10};
+static str xcaps_str_appxcxml	= {"application/xcap-caps+xml", 25};
 static str xcaps_str_appsexml	= {"application/vnd.oma.search+xml", 30};
 #endif
-static str xcaps_str_appapxml   = {"application/auth-policy+xml", 27};
+static str xcaps_str_appapxml	= {"application/auth-policy+xml", 27};
 static str xcaps_str_appupxml	= {"application/vnd.oma.user-profile+xml", 36}; 
 static str xcaps_str_apppcxml	= {"application/vnd.oma.pres-content+xml", 36};
+static str xcaps_str_apppdxml	= {"application/pidf+xml", 20};
 
 
 /**
@@ -946,6 +947,8 @@ static int w_xcaps_get(sip_msg_t* msg, char* puri, char* ppath)
 			ctype = &xcaps_str_appupxml;
 		else if(xuri.type==PRES_CONTENT)
 			ctype = &xcaps_str_apppcxml;
+		else if(xuri.type==PIDF_MANIPULATION)
+			ctype = &xcaps_str_apppdxml;
 		xcaps_send_reply(msg, 200, &xcaps_str_ok, &etag,
 				ctype, &body);
 	} else {




More information about the sr-dev mailing list