[asterisk-commits] may: branch may/ooh323_ipv6_direct_rtp r331241 - in /team/may/ooh323_ipv6_dir...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 9 12:51:00 CDT 2011
Author: may
Date: Tue Aug 9 12:50:54 2011
New Revision: 331241
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=331241
Log:
Merged revisions 331201-331202 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r331201 | kmoore | 2011-08-09 21:08:33 +0400 (Tue, 09 Aug 2011) | 11 lines
Allow ENUM query functions to report lookup errors
The ENUM dialplan functions do not report DNS query errors properly. It is
useful to differentiate between failed query (e.g. non-existent domain) vs. no
data records of the appropriate type. This is required to make overlapped
dialing work.
(closes issue ASTERISK-13769)
Review: https://reviewboard.asterisk.org/r/1355/
Patch-by: Timo Teras
................
r331202 | may | 2011-08-09 21:12:27 +0400 (Tue, 09 Aug 2011) | 28 lines
Merged revisions 331147,331200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10
................
r331147 | may | 2011-08-09 20:16:55 +0400 (Tue, 09 Aug 2011) | 11 lines
Merged revisions 331146 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r331146 | may | 2011-08-09 20:13:09 +0400 (Tue, 09 Aug 2011) | 4 lines
move ast_cond_signal for admitted call after all data filled/freed
clear all log channels by pointed number not only first
free allocated callToken in ooh323_answer
........
................
r331200 | may | 2011-08-09 20:36:39 +0400 (Tue, 09 Aug 2011) | 9 lines
Setup IP proto version for call in GK mode
Added additional check for IP semantics before parse destination
by ast_parse_args due to it can parse numeric as IP.
(closes issue ASTERISK-18218)
Reported by: slesru
Patch: ASTERISK-18218.patch
................
................
Modified:
team/may/ooh323_ipv6_direct_rtp/ (props changed)
team/may/ooh323_ipv6_direct_rtp/UPGRADE.txt
team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooGkClient.c
team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c
team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c
team/may/ooh323_ipv6_direct_rtp/funcs/func_enum.c
team/may/ooh323_ipv6_direct_rtp/main/enum.c
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
svn:mergeinfo = /trunk:331201-331202
Propchange: team/may/ooh323_ipv6_direct_rtp/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug 9 12:50:54 2011
@@ -1,1 +1,1 @@
-/trunk:1-313481,313483-313906,313908-313943,313945-331168
+/trunk:1-313481,313483-313906,313908-313943,313945-331240
Modified: team/may/ooh323_ipv6_direct_rtp/UPGRADE.txt
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/UPGRADE.txt?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/UPGRADE.txt (original)
+++ team/may/ooh323_ipv6_direct_rtp/UPGRADE.txt Tue Aug 9 12:50:54 2011
@@ -22,7 +22,10 @@
From 10 to 12:
-* No significant changes as of yet.
+func_enum:
+ - ENUM query functions now return a count of -1 on lookup error to
+ differentiate between a failed query and a successful query with 0 results
+ matching the specified type.
From 1.8 to 10:
Modified: team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/chan_ooh323.c Tue Aug 9 12:50:54 2011
@@ -1131,6 +1131,9 @@
ast_debug(1, "ooh323_answer(%s)\n", ast->name);
ast_channel_unlock(ast);
ooAnswerCall(p->callToken);
+ }
+ if (callToken) {
+ free(callToken);
}
ast_mutex_unlock(&p->lock);
}
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooGkClient.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooGkClient.c?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooGkClient.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooGkClient.c Tue Aug 9 12:50:54 2011
@@ -1947,8 +1947,11 @@
ipAddress->ip.data[1],
ipAddress->ip.data[2],
ipAddress->ip.data[3]);
- if(strcmp(ip, "0.0.0.0"))
+ if(strcmp(ip, "0.0.0.0")) {
+/* fix this when gk client will adopt to work with IPv6 */
+ pCallAdmInfo->call->versionIP = 4;
strcpy(pCallAdmInfo->call->remoteIP, ip);
+ }
pCallAdmInfo->call->remotePort = ipAddress->port;
/* Update call model */
if(pAdmissionConfirm->callModel.t == T_H225CallModel_direct)
@@ -1997,13 +2000,13 @@
pCallAdmInfo->call->callToken);
pCallAdmInfo->call->callState = OO_CALL_CONNECTING;
- ast_cond_signal(&pCallAdmInfo->call->gkWait);
/* ooH323CallAdmitted( pCallAdmInfo->call); */
dListRemove(&pGkClient->callsPendingList, pNode);
dListAppend(&pGkClient->ctxt, &pGkClient->callsAdmittedList,
pNode->data);
memFreePtr(&pGkClient->ctxt, pNode);
+ ast_cond_signal(&pCallAdmInfo->call->gkWait);
return OO_OK;
break;
}
Modified: team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/addons/ooh323c/src/ooq931.c Tue Aug 9 12:50:54 2011
@@ -3624,7 +3624,8 @@
return OO_OK;
}
- if (!ast_parse_arg(dest, PARSE_ADDR, &tmpaddr)) {
+ /* parse direct IP dest */
+ if ((strchr(dest, ':') || strchr(dest,'[') || strchr(dest,'.')) && !ast_parse_arg(dest, PARSE_ADDR, &tmpaddr)) {
if(strlen(dest)+7>len)
{
OOTRACEERR1("Error:Insufficient buffer space for parsed ip - "
Modified: team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/channels/sip/reqresp_parser.c Tue Aug 9 12:50:54 2011
@@ -65,6 +65,23 @@
/* check for valid input */
if (ast_strlen_zero(uri)) {
+ /* make sure we leave nothing undefined after we exit */
+ if (user) {
+ *user = "";
+ }
+ if (pass) {
+ *pass = "";
+ }
+ if (domain) {
+ *domain = "";
+ }
+ if (headers) {
+ *headers = "";
+ }
+ if (residue) {
+ *residue = "";
+ }
+
return -1;
}
Modified: team/may/ooh323_ipv6_direct_rtp/funcs/func_enum.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/funcs/func_enum.c?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/funcs/func_enum.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/funcs/func_enum.c Tue Aug 9 12:50:54 2011
@@ -82,7 +82,7 @@
<para>The number of the result that you want to retrieve.</para>
<para>Results start at <literal>1</literal>. If this argument is specified
as <literal>getnum</literal>, then it will return the total number of results
- that are available.</para>
+ that are available or -1 on error.</para>
</parameter>
</syntax>
<description>
@@ -105,7 +105,7 @@
<option name="c">
<para>Returns an integer count of the number of NAPTRs of a certain RR type.</para>
<para>Combination of <literal>c</literal> and Method-type of <literal>ALL</literal> will
- return a count of all NAPTRs for the record.</para>
+ return a count of all NAPTRs for the record or -1 on error.</para>
</option>
<option name="u">
<para>Returns the full URI and does not strip off the URI-scheme.</para>
@@ -363,7 +363,7 @@
erds = datastore->data;
if (!strcasecmp(args.resultnum, "getnum")) {
- snprintf(buf, len, "%u", erds->context->naptr_rrs_count);
+ snprintf(buf, len, "%d", erds->context->naptr_rrs_count);
res = 0;
goto finish;
}
Modified: team/may/ooh323_ipv6_direct_rtp/main/enum.c
URL: http://svnview.digium.com/svn/asterisk/team/may/ooh323_ipv6_direct_rtp/main/enum.c?view=diff&rev=331241&r1=331240&r2=331241
==============================================================================
--- team/may/ooh323_ipv6_direct_rtp/main/enum.c (original)
+++ team/may/ooh323_ipv6_direct_rtp/main/enum.c Tue Aug 9 12:50:54 2011
@@ -856,6 +856,7 @@
if (ret < 0) {
ast_debug(1, "No such number found: %s (%s)\n", tmp, strerror(errno));
+ context->naptr_rrs_count = -1;
strcpy(dst, "0");
ret = 0;
}
@@ -896,7 +897,7 @@
} else if (!(context->options & ENUMLOOKUP_OPTIONS_COUNT)) {
context->dst[0] = 0;
} else if ((context->options & ENUMLOOKUP_OPTIONS_COUNT)) {
- snprintf(context->dst, context->dstlen, "%d", context->count);
+ snprintf(context->dst, context->dstlen, "%d", context->naptr_rrs_count + context->count);
}
if (chan) {
More information about the asterisk-commits
mailing list