[svn-commits] oej: branch group/pinana-publish-1.4 r296527 - /team/group/pinana-publish-1.4...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Nov 28 14:05:14 CST 2010


Author: oej
Date: Sun Nov 28 14:05:11 2010
New Revision: 296527

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=296527
Log:
Move functions to a lower level. Don't mix functions with the declarations at top of chan_sip.c - it is messy enough as it is.

Modified:
    team/group/pinana-publish-1.4/channels/chan_sip.c

Modified: team/group/pinana-publish-1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pinana-publish-1.4/channels/chan_sip.c?view=diff&rev=296527&r1=296526&r2=296527
==============================================================================
--- team/group/pinana-publish-1.4/channels/chan_sip.c (original)
+++ team/group/pinana-publish-1.4/channels/chan_sip.c Sun Nov 28 14:05:11 2010
@@ -1267,28 +1267,6 @@
 	void (*destructor)(void *instance_data);
 };
 
-static void dlginfo_handle_publish_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry)
-{
-	/* Do we really care of errors here? */
-	return;
-}
-
-static void dlginfo_epa_destructor(void *data)
-{
-	/* XXX needs fixing???? */
-        struct sip_epa_entry *epa_entry = data;
-        //struct dlginfo_epa_entry *dlginfo_entry = epa_entry->instance_data;
-        //ast_free(dlginfo_entry);
-}
-
-
-static const struct epa_static_data dlginfo_epa_static_data  = {
-	.event = DIALOG_INFO_XML,
-	.name = "dialog-info",
-	.handle_error = dlginfo_handle_publish_error,
-	.destructor = dlginfo_epa_destructor,
-};
-
 /*!
  * \brief backend for an event publication agent
  */
@@ -1880,6 +1858,8 @@
 static int sip_pres_notify_update(struct sip_pvt *dialog, struct sip_request *req, int terminated, const char *termreason);
 static struct ao2_container *delete_devstate_publishers(void);
 static struct ao2_container *delete_published_devices(void);
+static void dlginfo_handle_publish_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry);
+static void dlginfo_epa_destructor(void *data);
 
 
 /*! \brief Definition of this channel for PBX channel registration */
@@ -1930,6 +1910,15 @@
 	.send_text = sip_sendtext,
 	.func_channel_read = acf_channel_read,
 };
+
+/*! \brief EPA declaration of dialog-info publish notifications */
+static const struct epa_static_data dlginfo_epa_static_data  = {
+	.event = DIALOG_INFO_XML,
+	.name = "dialog-info",
+	.handle_error = dlginfo_handle_publish_error,
+	.destructor = dlginfo_epa_destructor,
+};
+
 
 /**--- some list management macros. **/
  
@@ -9874,6 +9863,23 @@
 
 	return 0;
 }
+
+/*! \brief Handle errors when publishing dialog-info stuff */
+static void dlginfo_handle_publish_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry)
+{
+	/* Do we really care of errors here? */
+	ast_log(LOG_DEBUG, "-- %s : PUBLISH error response code %d\n", pvt->callid, resp);
+	return;
+}
+
+static void dlginfo_epa_destructor(void *data)
+{
+	/* XXX needs fixing???? */
+        struct sip_epa_entry *epa_entry = data;
+        //struct dlginfo_epa_entry *dlginfo_entry = epa_entry->instance_data;
+        //ast_free(dlginfo_entry);
+}
+
 
 /*! \brief Published_device destructor */
 static void pubdev_destructor(void *data)




More information about the svn-commits mailing list