[asterisk-commits] oej: branch oej/darjeeling-prack-11 r383666 - in /team/oej/darjeeling-prack-1...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 25 04:11:04 CDT 2013
Author: oej
Date: Mon Mar 25 04:10:57 2013
New Revision: 383666
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383666
Log:
Turn on automerge and reset the branch
Modified:
team/oej/darjeeling-prack-11/ (props changed)
team/oej/darjeeling-prack-11/apps/app_mixmonitor.c
team/oej/darjeeling-prack-11/codecs/Makefile
team/oej/darjeeling-prack-11/funcs/func_curl.c
team/oej/darjeeling-prack-11/res/res_xmpp.c
Propchange: team/oej/darjeeling-prack-11/
------------------------------------------------------------------------------
automerge = Is-there-life-off-net?
Propchange: team/oej/darjeeling-prack-11/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Propchange: team/oej/darjeeling-prack-11/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Mar 25 04:10:57 2013
@@ -1,1 +1,1 @@
-/branches/11:1-383169
+/branches/11:1-383665
Modified: team/oej/darjeeling-prack-11/apps/app_mixmonitor.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-11/apps/app_mixmonitor.c?view=diff&rev=383666&r1=383665&r2=383666
==============================================================================
--- team/oej/darjeeling-prack-11/apps/app_mixmonitor.c (original)
+++ team/oej/darjeeling-prack-11/apps/app_mixmonitor.c Mon Mar 25 04:10:57 2013
@@ -1042,7 +1042,7 @@
return 0;
}
-static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
+static int stop_mixmonitor_full(struct ast_channel *chan, const char *data)
{
struct ast_datastore *datastore = NULL;
char *parse = "";
@@ -1093,6 +1093,12 @@
}
ast_channel_unlock(chan);
+ return 0;
+}
+
+static int stop_mixmonitor_exec(struct ast_channel *chan, const char *data)
+{
+ stop_mixmonitor_full(chan, data);
return 0;
}
@@ -1315,7 +1321,7 @@
return AMI_SUCCESS;
}
- res = stop_mixmonitor_exec(c, mixmonitor_id);
+ res = stop_mixmonitor_full(c, mixmonitor_id);
if (res) {
astman_send_error(s, m, "Could not stop monitoring channel");
Modified: team/oej/darjeeling-prack-11/codecs/Makefile
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-11/codecs/Makefile?view=diff&rev=383666&r1=383665&r2=383666
==============================================================================
--- team/oej/darjeeling-prack-11/codecs/Makefile (original)
+++ team/oej/darjeeling-prack-11/codecs/Makefile Mon Mar 25 04:10:57 2013
@@ -53,8 +53,8 @@
for dir in $(SUB_DIRS); do \
$(MAKE) -C $$dir clean; \
done
- rm -f g722/*.[oa]
- rm -f speex/*.[oa]
+ rm -f g722/*.[oai]
+ rm -f speex/*.[oai]
.PHONY: $(SUB_DIRS)
Modified: team/oej/darjeeling-prack-11/funcs/func_curl.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-11/funcs/func_curl.c?view=diff&rev=383666&r1=383665&r2=383666
==============================================================================
--- team/oej/darjeeling-prack-11/funcs/func_curl.c (original)
+++ team/oej/darjeeling-prack-11/funcs/func_curl.c Mon Mar 25 04:10:57 2013
@@ -581,6 +581,7 @@
struct ast_datastore *store = NULL;
int hashcompat = 0;
AST_LIST_HEAD(global_curl_info, curl_settings) *list = NULL;
+ char curl_errbuf[CURL_ERROR_SIZE + 1]; /* add one to be safe */
if (buf) {
*buf = '\0';
@@ -642,7 +643,19 @@
curl_easy_setopt(*curl, CURLOPT_POSTFIELDS, args.postdata);
}
- curl_easy_perform(*curl);
+ /* Temporarily assign a buffer for curl to write errors to. */
+ curl_errbuf[0] = curl_errbuf[CURL_ERROR_SIZE] = '\0';
+ curl_easy_setopt(*curl, CURLOPT_ERRORBUFFER, curl_errbuf);
+
+ if (curl_easy_perform(*curl) != 0) {
+ ast_log(LOG_WARNING, "%s ('%s')\n", curl_errbuf, args.url);
+ }
+
+ /* Reset buffer to NULL so curl doesn't try to write to it when the
+ * buffer is deallocated. Documentation is vague about allowing NULL
+ * here, but the source allows it. See: "typecheck: allow NULL to unset
+ * CURLOPT_ERRORBUFFER" (62bcf005f4678a93158358265ba905bace33b834). */
+ curl_easy_setopt(*curl, CURLOPT_ERRORBUFFER, (char*)NULL);
if (store) {
AST_LIST_UNLOCK(list);
@@ -665,20 +678,11 @@
int rowcount = 0;
while (fields && values && (piece = strsep(&remainder, "&"))) {
char *name = strsep(&piece, "=");
- /* Do this before the decode, because if something has encoded
- * a literal plus-sign, we don't want to translate that to a
- * space. */
- if (hashcompat == HASHCOMPAT_LEGACY) {
- if (piece) {
- ast_uri_decode(piece, ast_uri_http_legacy);
- }
- ast_uri_decode(name, ast_uri_http_legacy);
- } else {
- if (piece) {
- ast_uri_decode(piece, ast_uri_http);
- }
- ast_uri_decode(name, ast_uri_http);
+ struct ast_flags mode = (hashcompat == HASHCOMPAT_LEGACY ? ast_uri_http_legacy : ast_uri_http);
+ if (piece) {
+ ast_uri_decode(piece, mode);
}
+ ast_uri_decode(name, mode);
ast_str_append(&fields, 0, "%s%s", rowcount ? "," : "", ast_str_set_escapecommas(&escapebuf, 0, name, INT_MAX));
ast_str_append(&values, 0, "%s%s", rowcount ? "," : "", ast_str_set_escapecommas(&escapebuf, 0, S_OR(piece, ""), INT_MAX));
rowcount++;
Modified: team/oej/darjeeling-prack-11/res/res_xmpp.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/darjeeling-prack-11/res/res_xmpp.c?view=diff&rev=383666&r1=383665&r2=383666
==============================================================================
--- team/oej/darjeeling-prack-11/res/res_xmpp.c (original)
+++ team/oej/darjeeling-prack-11/res/res_xmpp.c Mon Mar 25 04:10:57 2013
@@ -700,10 +700,10 @@
/*! \brief Comparator function for XMPP resource */
static int xmpp_resource_cmp(void *obj, void *arg, int flags)
{
- struct ast_xmpp_resource *resource1 = obj, *resource2 = arg;
+ struct ast_xmpp_resource *resource1 = obj;
const char *resource = arg;
- return !strcmp(resource1->resource, flags & OBJ_KEY ? resource : resource2->resource) ? CMP_MATCH | CMP_STOP : 0;
+ return !strcmp(resource1->resource, resource) ? CMP_MATCH | CMP_STOP : 0;
}
/*! \brief Destructor callback function for XMPP buddy */
@@ -1545,7 +1545,7 @@
return -1;
}
- if (ast_strlen_zero(jid.resource) || !(resource = ao2_find(buddy->resources, jid.resource, OBJ_KEY))) {
+ if (ast_strlen_zero(jid.resource) || !(resource = ao2_callback(buddy->resources, 0, xmpp_resource_cmp, jid.resource))) {
resource = ao2_callback(buddy->resources, OBJ_NODATA, xmpp_resource_immediate, NULL);
}
@@ -1616,7 +1616,7 @@
return -1;
}
- if (ast_strlen_zero(jid.resource) || !(resource = ao2_find(buddy->resources, jid.resource, OBJ_KEY))) {
+ if (ast_strlen_zero(jid.resource) || !(resource = ao2_callback(buddy->resources, 0, xmpp_resource_cmp, jid.resource))) {
resource = ao2_callback(buddy->resources, OBJ_NODATA, xmpp_resource_immediate, NULL);
}
@@ -2344,7 +2344,7 @@
return IKS_FILTER_EAT;
}
- if (!(resource = ao2_find(buddy->resources, pak->from->resource, OBJ_KEY))) {
+ if (!(resource = ao2_callback(buddy->resources, 0, xmpp_resource_cmp, pak->from->resource))) {
ao2_ref(buddy, -1);
return IKS_FILTER_EAT;
}
@@ -3137,7 +3137,7 @@
ao2_lock(buddy->resources);
- if (!(resource = ao2_find(buddy->resources, pak->from->resource, OBJ_KEY | OBJ_NOLOCK))) {
+ if (!(resource = ao2_callback(buddy->resources, OBJ_NOLOCK, xmpp_resource_cmp, pak->from->resource))) {
/* Only create the new resource if it is not going away - in reality this should not happen */
if (status != STATUS_DISAPPEAR) {
if (!(resource = ao2_alloc(sizeof(*resource), xmpp_resource_destructor))) {
More information about the asterisk-commits
mailing list