[asterisk-commits] oej: branch oej/pgtips-srv-and-outbound-stuff-1.8 r386093 - in /team/oej/pgti...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 19 03:17:19 CDT 2013
Author: oej
Date: Fri Apr 19 03:17:15 2013
New Revision: 386093
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386093
Log:
Initialize automatic merging in the pgtips-srv-and-outbound-stuff-1.8 branch...
Modified:
team/oej/pgtips-srv-and-outbound-stuff-1.8/ (props changed)
team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/sip/include/sip.h
team/oej/pgtips-srv-and-outbound-stuff-1.8/main/cli.c
team/oej/pgtips-srv-and-outbound-stuff-1.8/main/devicestate.c
team/oej/pgtips-srv-and-outbound-stuff-1.8/main/dns.c
team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c
team/oej/pgtips-srv-and-outbound-stuff-1.8/res/res_jabber.c
Propchange: team/oej/pgtips-srv-and-outbound-stuff-1.8/
------------------------------------------------------------------------------
automerge = Is-there-life-off-net?
Propchange: team/oej/pgtips-srv-and-outbound-stuff-1.8/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Fri Apr 19 03:17:15 2013
@@ -1,1 +1,1 @@
-/branches/1.8:1-385830
+/branches/1.8:1-386090
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/sip/include/sip.h?view=diff&rev=386093&r1=386092&r2=386093
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/sip/include/sip.h (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/sip/include/sip.h Fri Apr 19 03:17:15 2013
@@ -657,10 +657,13 @@
char name[MAXHOSTNAMELEN]; /*!< DNS name of domain/host or IP */
struct ast_sockaddr ip; /*!< Currently used IP address and port */
int port;
+ unsigned int priority; /*!< Priority from SRV */
+ unsigned int weight; /*!< Weight from SRV */
time_t last_dnsupdate; /*!< When this was resolved */
- enum sip_transport transport;
+ enum sip_transport transport; /*!< TCP, UDP or TCP/TLS - possibly WS in the future */
int force; /*!< If it's an outbound proxy, Force use of this outbound proxy for all outbound requests */
/* Room for a SRV record chain based on the name */
+ struct sip_proxy *next;
};
/*! \brief argument for the 'show channels|subscriptions' callback. */
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/main/cli.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/main/cli.c?view=diff&rev=386093&r1=386092&r2=386093
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/main/cli.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/main/cli.c Fri Apr 19 03:17:15 2013
@@ -93,9 +93,9 @@
AST_RWLIST_HEAD(module_level_list, module_level);
/*! list of module names and their debug levels */
-static struct module_level_list debug_modules;
+static struct module_level_list debug_modules = AST_RWLIST_HEAD_INIT_VALUE;
/*! list of module names and their verbose levels */
-static struct module_level_list verbose_modules;
+static struct module_level_list verbose_modules = AST_RWLIST_HEAD_INIT_VALUE;
AST_THREADSTORAGE(ast_cli_buf);
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/main/devicestate.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/main/devicestate.c?view=diff&rev=386093&r1=386092&r2=386093
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/main/devicestate.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/main/devicestate.c Fri Apr 19 03:17:15 2013
@@ -705,7 +705,7 @@
static void devstate_change_collector_cb(const struct ast_event *event, void *data)
{
struct devstate_change *sc;
- const char *device;
+ const char *device, *cachable_str;
const struct ast_eid *eid;
uint32_t state;
enum ast_devstate_cache cachable = AST_DEVSTATE_CACHABLE;
@@ -713,7 +713,6 @@
device = ast_event_get_ie_str(event, AST_EVENT_IE_DEVICE);
eid = ast_event_get_ie_raw(event, AST_EVENT_IE_EID);
state = ast_event_get_ie_uint(event, AST_EVENT_IE_STATE);
- cachable = ast_event_get_ie_uint(event, AST_EVENT_IE_CACHABLE);
if (ast_strlen_zero(device) || !eid) {
ast_log(LOG_ERROR, "Invalid device state change event received\n");
@@ -726,6 +725,16 @@
strcpy(sc->device, device);
sc->eid = *eid;
sc->state = state;
+
+ /* For 'cachable' we cannot use ast_event_get_ie_uint(), it overwrites the default of AST_DEVSTATE_CACHABLE we
+ * have already setup for 'cachable', if for whatever reason the AST_EVENT_IE_CACHABLE wasn't
+ * posted in the event ast_event_get_ie_uint() is going will return 0,
+ * which equates to AST_DEVSTATE_NOT_CACHABLE the first enumeration in 'ast_devstate_cache'.
+ */
+
+ if ((cachable_str = ast_event_get_ie_str(event, AST_EVENT_IE_CACHABLE))) {
+ sscanf(cachable_str, "%30u", &cachable);
+ }
sc->cachable = cachable;
ast_mutex_lock(&devstate_collector.lock);
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/main/dns.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/main/dns.c?view=diff&rev=386093&r1=386092&r2=386093
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/main/dns.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/main/dns.c Fri Apr 19 03:17:15 2013
@@ -284,6 +284,8 @@
ret = 0;
} else
ret = 1;
+ } else {
+ ast_debug(1, "DNS lookup error %d for %s\n", dname, res);
}
#ifdef HAVE_RES_NINIT
#ifdef HAVE_RES_NDESTROY
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c?view=diff&rev=386093&r1=386092&r2=386093
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/main/srv.c Fri Apr 19 03:17:15 2013
@@ -57,6 +57,8 @@
#define T_SRV 33
#endif
+/*! \brief The list of SRV record entries, straight from the DNS response
+ */
struct srv_entry {
unsigned short priority;
unsigned short weight;
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/res/res_jabber.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/res/res_jabber.c?view=diff&rev=386093&r1=386092&r2=386093
==============================================================================
--- team/oej/pgtips-srv-and-outbound-stuff-1.8/res/res_jabber.c (original)
+++ team/oej/pgtips-srv-and-outbound-stuff-1.8/res/res_jabber.c Fri Apr 19 03:17:15 2013
@@ -3280,14 +3280,15 @@
return IKS_FILTER_EAT;
}
if (!strcasecmp(iks_name(item_content), "state")) {
+ if ((cachable_str = iks_find_attrib(item_content, "cachable"))) {
+ sscanf(cachable_str, "%30d", &cachable);
+ }
device_state = iks_find_cdata(item, "state");
- if ((cachable_str = iks_find_cdata(item, "cachable"))) {
- sscanf(cachable_str, "%30d", &cachable);
- }
if (!(event = ast_event_new(AST_EVENT_DEVICE_STATE_CHANGE,
AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, item_id, AST_EVENT_IE_STATE,
AST_EVENT_IE_PLTYPE_UINT, ast_devstate_val(device_state), AST_EVENT_IE_EID,
AST_EVENT_IE_PLTYPE_RAW, &pubsub_eid, sizeof(pubsub_eid),
+ AST_EVENT_IE_CACHABLE, AST_EVENT_IE_PLTYPE_UINT, cachable,
AST_EVENT_IE_END))) {
return IKS_FILTER_EAT;
}
More information about the asterisk-commits
mailing list