[asterisk-commits] mmichelson: branch group/CCSS r230959 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 23 13:30:02 CST 2009


Author: mmichelson
Date: Mon Nov 23 13:30:00 2009
New Revision: 230959

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=230959
Log:
Copy the returned Sip-ETag to the sip_epa_entry


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=230959&r1=230958&r2=230959
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Mon Nov 23 13:30:00 2009
@@ -1706,11 +1706,11 @@
 	return 0;
 }
 
-static void cc_handle_ok(struct sip_pvt *, struct sip_request *, struct sip_epa_entry *)
+static void cc_handle_ok(struct sip_pvt *pvt, struct sip_request *req, struct sip_epa_entry *epa_entry)
 {
 	/* XXX STUB */
 }
-static void cc_handle_error(struct sip_pvt *, const int resp, struct sip_request *, struct sip_epa_entry *)
+static void cc_handle_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry)
 {
 	/* XXX STUB */
 }
@@ -18870,8 +18870,13 @@
 static void handle_response_publish(struct sip_pvt *p, int resp, const char *rest, struct sip_request *req, int seqno)
 {
 	struct sip_epa_entry *epa_entry = p->epa_entry;
+	const char *etag = get_header(req, "Sip-ETag");
 
 	ast_assert(epa_entry != NULL);
+
+	if (!ast_strlen_zero(etag)) {
+		ast_copy_string(epa_entry->entity_tag, etag, sizeof(epa_entry->entity_tag));
+	}
 
 	if (resp == 200) {
 		/* The nominal case. Everything went well. Everybody is happy.




More information about the asterisk-commits mailing list