[asterisk-commits] mmichelson: branch group/CCSS r233313 - /team/group/CCSS/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 4 16:23:11 CST 2009
Author: mmichelson
Date: Fri Dec 4 16:23:07 2009
New Revision: 233313
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=233313
Log:
Send 400 responses if elements are missing from the PIDF document.
Modified:
team/group/CCSS/channels/chan_sip.c
Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=233313&r1=233312&r2=233313
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Fri Dec 4 16:23:07 2009
@@ -23495,7 +23495,7 @@
agent_pvt = agent->private_data;
if (sip_pidf_validate(req, &pidf_doc) == FALSE) {
- /* XXX send an error response. What though? */
+ transmit_response(pvt, "400 Bad Request", req);
}
/* It's important to note that the PIDF validation routine has no knowledge
@@ -23508,7 +23508,7 @@
tuple_node = ast_xml_find_element(presence_node, "tuple", NULL, NULL);
if (!tuple_node) {
- /*XXX send an error response, yo! */
+ transmit_response(pvt, "400 Bad Request", req);
}
status_node = ast_xml_find_element(tuple_node, "status", NULL, NULL);
@@ -23517,7 +23517,7 @@
*/
basic_node = ast_xml_find_element(status_node, "basic", NULL, NULL);
if (!basic_node) {
- /* XXX send an error response */
+ transmit_response(pvt, "400 Bad Request", req);
}
basic_status = ast_xml_get_text(basic_node);
@@ -23527,7 +23527,7 @@
} else if (!strcmp(basic_status, "closed")) {
agent_pvt->is_available = FALSE;
} else {
- /* XXX send an error response */
+ transmit_response(pvt, "400 Bad Request", req);
}
ast_xml_free_text(basic_status);
More information about the asterisk-commits
mailing list