mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 03:04:19 +00:00
Compare commits
11 Commits
certified/
...
1.8.11.0-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6fda936a3 | ||
|
|
50287d6784 | ||
|
|
32dcf74b49 | ||
|
|
7433620434 | ||
|
|
10f8f04543 | ||
|
|
99dd1a9c00 | ||
|
|
0f2b7f3a33 | ||
|
|
10630b691a | ||
|
|
b1a40090c2 | ||
|
|
05f15d9414 | ||
|
|
2de4c4a439 |
3
.lastclean
Normal file
3
.lastclean
Normal file
@@ -0,0 +1,3 @@
|
||||
39
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ static void milliwatt_release(struct ast_channel *chan, void *data)
|
||||
static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int samples)
|
||||
{
|
||||
unsigned char buf[AST_FRIENDLY_OFFSET + 640];
|
||||
const int maxsamples = ARRAY_LEN(buf);
|
||||
const int maxsamples = ARRAY_LEN(buf) - (AST_FRIENDLY_OFFSET / sizeof(buf[0]));
|
||||
int i, *indexp = (int *) data;
|
||||
struct ast_frame wf = {
|
||||
.frametype = AST_FRAME_VOICE,
|
||||
|
||||
63
asterisk-1.8.11.0-rc3-summary.html
Normal file
63
asterisk-1.8.11.0-rc3-summary.html
Normal file
@@ -0,0 +1,63 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>Release Summary - asterisk-1.8.11.0-rc3</title></head>
|
||||
<body>
|
||||
<h1 align="center"><a name="top">Release Summary</a></h1>
|
||||
<h3 align="center">asterisk-1.8.11.0-rc3</h3>
|
||||
<h3 align="center">Date: 2012-03-26</h3>
|
||||
<h3 align="center"><asteriskteam@digium.com></h3>
|
||||
<hr/>
|
||||
<h2 align="center">Table of Contents</h2>
|
||||
<ol>
|
||||
<li><a href="#summary">Summary</a></li>
|
||||
<li><a href="#contributors">Contributors</a></li>
|
||||
<li><a href="#commits">Other Changes</a></li>
|
||||
<li><a href="#diffstat">Diffstat</a></li>
|
||||
</ol>
|
||||
<hr/>
|
||||
<a name="summary"><h2 align="center">Summary</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This release includes only bug fixes. The changes included were made only to address problems that have been identified in this release series. Users should be able to safely upgrade to this version if this release series is already in use. Users considering upgrading from a previous release series are strongly encouraged to review the UPGRADE.txt document as well as the CHANGES document for information about upgrading to this release series.</p>
|
||||
<p>The data in this summary reflects changes that have been made since the previous release, asterisk-1.8.11.0-rc2.</p>
|
||||
<hr/>
|
||||
<a name="contributors"><h2 align="center">Contributors</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This table lists the people who have submitted code, those that have tested patches, as well as those that reported issues on the issue tracker that were resolved in this release. For coders, the number is how many of their patches (of any size) were committed into this release. For testers, the number is the number of times their name was listed as assisting with testing a patch. Finally, for reporters, the number is the number of issues that they reported that were closed by commits that went into this release.</p>
|
||||
<table width="100%" border="0">
|
||||
<tr>
|
||||
<td width="33%"><h3>Coders</h3></td>
|
||||
<td width="33%"><h3>Testers</h3></td>
|
||||
<td width="33%"><h3>Reporters</h3></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td>
|
||||
2 bebuild<br/>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
<a name="commits"><h2 align="center">Commits Not Associated with an Issue</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a list of all changes that went into this release that did not directly close an issue from the issue tracker. The commits may have been marked as being related to an issue. If that is the case, the issue numbers are listed here, as well.</p>
|
||||
<table width="100%" border="1">
|
||||
<tr><td><b>Revision</b></td><td><b>Author</b></td><td><b>Summary</b></td><td><b>Issues Referenced</b></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=360463">360463</a></td><td>bebuild</td><td>Create 1.8.11.0-rc3 tag</td>
|
||||
<td></td></tr><tr><td><a href="http://svn.digium.com/view/asterisk/branches/1.8?view=revision&revision=360466">360466</a></td><td>bebuild</td><td>Merged 359979, 359656, 359706 for rc3</td>
|
||||
<td></td></tr></table>
|
||||
<hr/>
|
||||
<a name="diffstat"><h2 align="center">Diffstat Results</h2></a>
|
||||
<center><a href="#top">[Back to Top]</a></center><br/><p>This is a summary of the changes to the source code that went into this release that was generated using the diffstat utility.</p>
|
||||
<pre>
|
||||
.version | 2
|
||||
ChangeLog | 36 +++
|
||||
apps/app_milliwatt.c | 2
|
||||
asterisk-1.8.11.0-rc2-summary.html | 200 -------------------
|
||||
asterisk-1.8.11.0-rc2-summary.txt | 388 -------------------------------------
|
||||
include/asterisk/manager.h | 2
|
||||
main/manager.c | 27 ++
|
||||
main/utils.c | 128 ++++++------
|
||||
8 files changed, 132 insertions(+), 653 deletions(-)
|
||||
</pre><br/>
|
||||
<hr/>
|
||||
</body>
|
||||
</html>
|
||||
92
asterisk-1.8.11.0-rc3-summary.txt
Normal file
92
asterisk-1.8.11.0-rc3-summary.txt
Normal file
@@ -0,0 +1,92 @@
|
||||
Release Summary
|
||||
|
||||
asterisk-1.8.11.0-rc3
|
||||
|
||||
Date: 2012-03-26
|
||||
|
||||
<asteriskteam@digium.com>
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Table of Contents
|
||||
|
||||
1. Summary
|
||||
2. Contributors
|
||||
3. Other Changes
|
||||
4. Diffstat
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Summary
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This release includes only bug fixes. The changes included were made only
|
||||
to address problems that have been identified in this release series.
|
||||
Users should be able to safely upgrade to this version if this release
|
||||
series is already in use. Users considering upgrading from a previous
|
||||
release series are strongly encouraged to review the UPGRADE.txt document
|
||||
as well as the CHANGES document for information about upgrading to this
|
||||
release series.
|
||||
|
||||
The data in this summary reflects changes that have been made since the
|
||||
previous release, asterisk-1.8.11.0-rc2.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Contributors
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This table lists the people who have submitted code, those that have
|
||||
tested patches, as well as those that reported issues on the issue tracker
|
||||
that were resolved in this release. For coders, the number is how many of
|
||||
their patches (of any size) were committed into this release. For testers,
|
||||
the number is the number of times their name was listed as assisting with
|
||||
testing a patch. Finally, for reporters, the number is the number of
|
||||
issues that they reported that were closed by commits that went into this
|
||||
release.
|
||||
|
||||
Coders Testers Reporters
|
||||
2 bebuild
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Commits Not Associated with an Issue
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a list of all changes that went into this release that did not
|
||||
directly close an issue from the issue tracker. The commits may have been
|
||||
marked as being related to an issue. If that is the case, the issue
|
||||
numbers are listed here, as well.
|
||||
|
||||
+------------------------------------------------------------------------+
|
||||
| Revision | Author | Summary | Issues Referenced |
|
||||
|----------+---------+-------------------------------+-------------------|
|
||||
| 360463 | bebuild | Create 1.8.11.0-rc3 tag | |
|
||||
|----------+---------+-------------------------------+-------------------|
|
||||
| 360466 | bebuild | Merged 359979, 359656, 359706 | |
|
||||
| | | for rc3 | |
|
||||
+------------------------------------------------------------------------+
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Diffstat Results
|
||||
|
||||
[Back to Top]
|
||||
|
||||
This is a summary of the changes to the source code that went into this
|
||||
release that was generated using the diffstat utility.
|
||||
|
||||
.version | 2
|
||||
ChangeLog | 36 +++
|
||||
apps/app_milliwatt.c | 2
|
||||
asterisk-1.8.11.0-rc2-summary.html | 200 -------------------
|
||||
asterisk-1.8.11.0-rc2-summary.txt | 388 -------------------------------------
|
||||
include/asterisk/manager.h | 2
|
||||
main/manager.c | 27 ++
|
||||
main/utils.c | 128 ++++++------
|
||||
8 files changed, 132 insertions(+), 653 deletions(-)
|
||||
|
||||
----------------------------------------------------------------------
|
||||
@@ -160,6 +160,8 @@ struct manager_action {
|
||||
* function and unregestring the AMI action object.
|
||||
*/
|
||||
unsigned int registered:1;
|
||||
/*! Number of active func() calls in progress. */
|
||||
unsigned int active_count;
|
||||
};
|
||||
|
||||
/*! \brief External routines may register/unregister manager callbacks this way
|
||||
|
||||
@@ -737,6 +737,7 @@ int ast_find_ourip(struct ast_sockaddr *ourip, const struct ast_sockaddr *bindad
|
||||
{
|
||||
char ourhost[MAXHOSTNAMELEN] = "";
|
||||
struct ast_sockaddr root;
|
||||
int res, port = ast_sockaddr_port(ourip);
|
||||
|
||||
/* just use the bind address if it is nonzero */
|
||||
if (!ast_sockaddr_is_any(bindaddr)) {
|
||||
@@ -749,6 +750,8 @@ int ast_find_ourip(struct ast_sockaddr *ourip, const struct ast_sockaddr *bindad
|
||||
ast_log(LOG_WARNING, "Unable to get hostname\n");
|
||||
} else {
|
||||
if (resolve_first(ourip, ourhost, PARSE_PORT_FORBID, family) == 0) {
|
||||
/* reset port since resolve_first wipes this out */
|
||||
ast_sockaddr_set_port(ourip, port);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -756,8 +759,12 @@ int ast_find_ourip(struct ast_sockaddr *ourip, const struct ast_sockaddr *bindad
|
||||
/* A.ROOT-SERVERS.NET. */
|
||||
if (!resolve_first(&root, "A.ROOT-SERVERS.NET", PARSE_PORT_FORBID, 0) &&
|
||||
!ast_ouraddrfor(&root, ourip)) {
|
||||
/* reset port since resolve_first wipes this out */
|
||||
ast_sockaddr_set_port(ourip, port);
|
||||
return 0;
|
||||
}
|
||||
return get_local_address(ourip);
|
||||
res = get_local_address(ourip);
|
||||
ast_sockaddr_set_port(ourip, port);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -1935,7 +1935,11 @@ int ast_hook_send_action(struct manager_custom_hook *hook, const char *msg)
|
||||
|
||||
ao2_lock(act_found);
|
||||
if (act_found->registered && act_found->func) {
|
||||
++act_found->active_count;
|
||||
ao2_unlock(act_found);
|
||||
ret = act_found->func(&s, &m);
|
||||
ao2_lock(act_found);
|
||||
--act_found->active_count;
|
||||
} else {
|
||||
ret = -1;
|
||||
}
|
||||
@@ -4635,8 +4639,12 @@ static int process_message(struct mansession *s, const struct message *m)
|
||||
ao2_lock(act_found);
|
||||
if (act_found->registered && act_found->func) {
|
||||
ast_debug(1, "Running action '%s'\n", act_found->action);
|
||||
++act_found->active_count;
|
||||
ao2_unlock(act_found);
|
||||
ret = act_found->func(s, m);
|
||||
acted = 1;
|
||||
ao2_lock(act_found);
|
||||
--act_found->active_count;
|
||||
}
|
||||
ao2_unlock(act_found);
|
||||
}
|
||||
@@ -5144,6 +5152,8 @@ int ast_manager_unregister(char *action)
|
||||
AST_RWLIST_UNLOCK(&actions);
|
||||
|
||||
if (cur) {
|
||||
time_t now;
|
||||
|
||||
/*
|
||||
* We have removed the action object from the container so we
|
||||
* are no longer in a hurry.
|
||||
@@ -5152,6 +5162,23 @@ int ast_manager_unregister(char *action)
|
||||
cur->registered = 0;
|
||||
ao2_unlock(cur);
|
||||
|
||||
/*
|
||||
* Wait up to 5 seconds for any active invocations to complete
|
||||
* before returning. We have to wait instead of blocking
|
||||
* because we may be waiting for ourself to complete.
|
||||
*/
|
||||
now = time(NULL);
|
||||
while (cur->active_count) {
|
||||
if (5 <= time(NULL) - now) {
|
||||
ast_debug(1,
|
||||
"Unregister manager action %s timed out waiting for %d active instances to complete\n",
|
||||
action, cur->active_count);
|
||||
break;
|
||||
}
|
||||
|
||||
sched_yield();
|
||||
}
|
||||
|
||||
ao2_t_ref(cur, -1, "action object removed from list");
|
||||
ast_verb(2, "Manager unregistered action %s\n", action);
|
||||
}
|
||||
|
||||
128
main/utils.c
128
main/utils.c
@@ -1985,10 +1985,29 @@ int ast_utils_init(void)
|
||||
* pedantic arg can be set to nonzero if we need to do addition Digest check.
|
||||
*/
|
||||
int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic) {
|
||||
int i;
|
||||
char *c, key[512], val[512];
|
||||
char *c;
|
||||
struct ast_str *str = ast_str_create(16);
|
||||
|
||||
/* table of recognised keywords, and places where they should be copied */
|
||||
const struct x {
|
||||
const char *key;
|
||||
const ast_string_field *field;
|
||||
} *i, keys[] = {
|
||||
{ "username=", &d->username },
|
||||
{ "realm=", &d->realm },
|
||||
{ "nonce=", &d->nonce },
|
||||
{ "uri=", &d->uri },
|
||||
{ "domain=", &d->domain },
|
||||
{ "response=", &d->response },
|
||||
{ "cnonce=", &d->cnonce },
|
||||
{ "opaque=", &d->opaque },
|
||||
/* Special cases that cannot be directly copied */
|
||||
{ "algorithm=", NULL },
|
||||
{ "qop=", NULL },
|
||||
{ "nc=", NULL },
|
||||
{ NULL, 0 },
|
||||
};
|
||||
|
||||
if (ast_strlen_zero(digest) || !d || !str) {
|
||||
ast_free(str);
|
||||
return -1;
|
||||
@@ -2006,72 +2025,55 @@ int ast_parse_digest(const char *digest, struct ast_http_digest *d, int request,
|
||||
c += strlen("Digest ");
|
||||
|
||||
/* lookup for keys/value pair */
|
||||
while (*c && *(c = ast_skip_blanks(c))) {
|
||||
while (c && *c && *(c = ast_skip_blanks(c))) {
|
||||
/* find key */
|
||||
i = 0;
|
||||
while (*c && *c != '=' && *c != ',' && !isspace(*c)) {
|
||||
key[i++] = *c++;
|
||||
}
|
||||
key[i] = '\0';
|
||||
c = ast_skip_blanks(c);
|
||||
if (*c == '=') {
|
||||
c = ast_skip_blanks(++c);
|
||||
i = 0;
|
||||
if (*c == '\"') {
|
||||
/* in quotes. Skip first and look for last */
|
||||
c++;
|
||||
while (*c && *c != '\"') {
|
||||
if (*c == '\\' && c[1] != '\0') { /* unescape chars */
|
||||
c++;
|
||||
}
|
||||
val[i++] = *c++;
|
||||
}
|
||||
for (i = keys; i->key != NULL; i++) {
|
||||
char *src, *separator;
|
||||
int unescape = 0;
|
||||
if (strncasecmp(c, i->key, strlen(i->key)) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Found. Skip keyword, take text in quotes or up to the separator. */
|
||||
c += strlen(i->key);
|
||||
if (*c == '"') {
|
||||
src = ++c;
|
||||
separator = "\"";
|
||||
unescape = 1;
|
||||
} else {
|
||||
/* token */
|
||||
while (*c && *c != ',' && !isspace(*c)) {
|
||||
val[i++] = *c++;
|
||||
src = c;
|
||||
separator = ",";
|
||||
}
|
||||
strsep(&c, separator); /* clear separator and move ptr */
|
||||
if (unescape) {
|
||||
ast_unescape_c(src);
|
||||
}
|
||||
if (i->field) {
|
||||
ast_string_field_ptr_set(d, i->field, src);
|
||||
} else {
|
||||
/* Special cases that require additional procesing */
|
||||
if (!strcasecmp(i->key, "algorithm=")) {
|
||||
if (strcasecmp(src, "MD5")) {
|
||||
ast_log(LOG_WARNING, "Digest algorithm: \"%s\" not supported.\n", src);
|
||||
ast_free(str);
|
||||
return -1;
|
||||
}
|
||||
} else if (!strcasecmp(i->key, "qop=") && !strcasecmp(src, "auth")) {
|
||||
d->qop = 1;
|
||||
} else if (!strcasecmp(i->key, "nc=")) {
|
||||
unsigned long u;
|
||||
if (sscanf(src, "%30lx", &u) != 1) {
|
||||
ast_log(LOG_WARNING, "Incorrect Digest nc value: \"%s\".\n", src);
|
||||
ast_free(str);
|
||||
return -1;
|
||||
}
|
||||
ast_string_field_set(d, nc, src);
|
||||
}
|
||||
}
|
||||
val[i] = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
while (*c && *c != ',') {
|
||||
c++;
|
||||
}
|
||||
if (*c) {
|
||||
c++;
|
||||
}
|
||||
|
||||
if (!strcasecmp(key, "username")) {
|
||||
ast_string_field_set(d, username, val);
|
||||
} else if (!strcasecmp(key, "realm")) {
|
||||
ast_string_field_set(d, realm, val);
|
||||
} else if (!strcasecmp(key, "nonce")) {
|
||||
ast_string_field_set(d, nonce, val);
|
||||
} else if (!strcasecmp(key, "uri")) {
|
||||
ast_string_field_set(d, uri, val);
|
||||
} else if (!strcasecmp(key, "domain")) {
|
||||
ast_string_field_set(d, domain, val);
|
||||
} else if (!strcasecmp(key, "response")) {
|
||||
ast_string_field_set(d, response, val);
|
||||
} else if (!strcasecmp(key, "algorithm")) {
|
||||
if (strcasecmp(val, "MD5")) {
|
||||
ast_log(LOG_WARNING, "Digest algorithm: \"%s\" not supported.\n", val);
|
||||
return -1;
|
||||
}
|
||||
} else if (!strcasecmp(key, "cnonce")) {
|
||||
ast_string_field_set(d, cnonce, val);
|
||||
} else if (!strcasecmp(key, "opaque")) {
|
||||
ast_string_field_set(d, opaque, val);
|
||||
} else if (!strcasecmp(key, "qop") && !strcasecmp(val, "auth")) {
|
||||
d->qop = 1;
|
||||
} else if (!strcasecmp(key, "nc")) {
|
||||
unsigned long u;
|
||||
if (sscanf(val, "%30lx", &u) != 1) {
|
||||
ast_log(LOG_WARNING, "Incorrect Digest nc value: \"%s\".\n", val);
|
||||
return -1;
|
||||
}
|
||||
ast_string_field_set(d, nc, val);
|
||||
if (i->key == NULL) { /* not found, try ',' */
|
||||
strsep(&c, ",");
|
||||
}
|
||||
}
|
||||
ast_free(str);
|
||||
|
||||
Reference in New Issue
Block a user