That's all, folks. Not going to update the Makefile until res_jabber is
converted (snuffy, you there? :)) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137110 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
790fde68d9
commit
74bf61579f
712
main/say.c
712
main/say.c
File diff suppressed because it is too large
Load Diff
22
main/sched.c
22
main/sched.c
|
@ -245,17 +245,17 @@ static void schedule(struct sched_context *con, struct sched *s)
|
||||||
* given the last event *tv and the offset in milliseconds 'when',
|
* given the last event *tv and the offset in milliseconds 'when',
|
||||||
* computes the next value,
|
* computes the next value,
|
||||||
*/
|
*/
|
||||||
static int sched_settime(struct timeval *tv, int when)
|
static int sched_settime(struct timeval *t, int when)
|
||||||
{
|
{
|
||||||
struct timeval now = ast_tvnow();
|
struct timeval now = ast_tvnow();
|
||||||
|
|
||||||
/*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
|
/*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
|
||||||
if (ast_tvzero(*tv)) /* not supplied, default to now */
|
if (ast_tvzero(*t)) /* not supplied, default to now */
|
||||||
*tv = now;
|
*t = now;
|
||||||
*tv = ast_tvadd(*tv, ast_samp2tv(when, 1000));
|
*t = ast_tvadd(*t, ast_samp2tv(when, 1000));
|
||||||
if (ast_tvcmp(*tv, now) < 0) {
|
if (ast_tvcmp(*t, now) < 0) {
|
||||||
ast_debug(1, "Request to schedule in the past?!?!\n");
|
ast_debug(1, "Request to schedule in the past?!?!\n");
|
||||||
*tv = now;
|
*t = now;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -428,7 +428,7 @@ char *ast_sched_report(struct sched_context *con, char *buf, int bufsiz, struct
|
||||||
void ast_sched_dump(const struct sched_context *con)
|
void ast_sched_dump(const struct sched_context *con)
|
||||||
{
|
{
|
||||||
struct sched *q;
|
struct sched *q;
|
||||||
struct timeval tv = ast_tvnow();
|
struct timeval when = ast_tvnow();
|
||||||
#ifdef SCHED_MAX_CACHE
|
#ifdef SCHED_MAX_CACHE
|
||||||
ast_debug(1, "Asterisk Schedule Dump (%d in Q, %d Total, %d Cache, %d high-water)\n", con->schedcnt, con->eventcnt - 1, con->schedccnt, con->highwater);
|
ast_debug(1, "Asterisk Schedule Dump (%d in Q, %d Total, %d Cache, %d high-water)\n", con->schedcnt, con->eventcnt - 1, con->schedccnt, con->highwater);
|
||||||
#else
|
#else
|
||||||
|
@ -439,7 +439,7 @@ void ast_sched_dump(const struct sched_context *con)
|
||||||
ast_debug(1, "|ID Callback Data Time (sec:ms) |\n");
|
ast_debug(1, "|ID Callback Data Time (sec:ms) |\n");
|
||||||
ast_debug(1, "+-----+-----------------+-----------------+-----------------+\n");
|
ast_debug(1, "+-----+-----------------+-----------------+-----------------+\n");
|
||||||
AST_DLLIST_TRAVERSE(&con->schedq, q, list) {
|
AST_DLLIST_TRAVERSE(&con->schedq, q, list) {
|
||||||
struct timeval delta = ast_tvsub(q->when, tv);
|
struct timeval delta = ast_tvsub(q->when, when);
|
||||||
|
|
||||||
ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
|
ast_debug(1, "|%.4d | %-15p | %-15p | %.6ld : %.6ld |\n",
|
||||||
q->id,
|
q->id,
|
||||||
|
@ -458,7 +458,7 @@ void ast_sched_dump(const struct sched_context *con)
|
||||||
int ast_sched_runq(struct sched_context *con)
|
int ast_sched_runq(struct sched_context *con)
|
||||||
{
|
{
|
||||||
struct sched *current;
|
struct sched *current;
|
||||||
struct timeval tv;
|
struct timeval when;
|
||||||
int numevents;
|
int numevents;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
|
@ -472,8 +472,8 @@ int ast_sched_runq(struct sched_context *con)
|
||||||
* help us get more than one event at one time if they are very
|
* help us get more than one event at one time if they are very
|
||||||
* close together.
|
* close together.
|
||||||
*/
|
*/
|
||||||
tv = ast_tvadd(ast_tvnow(), ast_tv(0, 1000));
|
when = ast_tvadd(ast_tvnow(), ast_tv(0, 1000));
|
||||||
if (ast_tvcmp(AST_DLLIST_FIRST(&con->schedq)->when, tv) != -1)
|
if (ast_tvcmp(AST_DLLIST_FIRST(&con->schedq)->when, when) != -1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
current = AST_DLLIST_REMOVE_HEAD(&con->schedq, list);
|
current = AST_DLLIST_REMOVE_HEAD(&con->schedq, list);
|
||||||
|
|
|
@ -190,7 +190,7 @@ static char *cli_tps_ping(struct ast_cli_entry *e, int cmd, struct ast_cli_args
|
||||||
{
|
{
|
||||||
struct timeval begin, end, delta;
|
struct timeval begin, end, delta;
|
||||||
char *name;
|
char *name;
|
||||||
struct timeval tv;
|
struct timeval when;
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
struct ast_taskprocessor *tps = NULL;
|
struct ast_taskprocessor *tps = NULL;
|
||||||
|
|
||||||
|
@ -214,9 +214,9 @@ static char *cli_tps_ping(struct ast_cli_entry *e, int cmd, struct ast_cli_args
|
||||||
return CLI_SUCCESS;
|
return CLI_SUCCESS;
|
||||||
}
|
}
|
||||||
ast_cli(a->fd, "\npinging %s ...", name);
|
ast_cli(a->fd, "\npinging %s ...", name);
|
||||||
tv = ast_tvadd((begin = ast_tvnow()), ast_samp2tv(1000, 1000));
|
when = ast_tvadd((begin = ast_tvnow()), ast_samp2tv(1000, 1000));
|
||||||
ts.tv_sec = tv.tv_sec;
|
ts.tv_sec = when.tv_sec;
|
||||||
ts.tv_nsec = tv.tv_usec * 1000;
|
ts.tv_nsec = when.tv_usec * 1000;
|
||||||
ast_mutex_lock(&cli_ping_cond_lock);
|
ast_mutex_lock(&cli_ping_cond_lock);
|
||||||
if (ast_taskprocessor_push(tps, tps_ping_handler, 0) < 0) {
|
if (ast_taskprocessor_push(tps, tps_ping_handler, 0) < 0) {
|
||||||
ast_cli(a->fd, "\nping failed: could not push task to %s\n\n", name);
|
ast_cli(a->fd, "\nping failed: could not push task to %s\n\n", name);
|
||||||
|
|
14
main/udptl.c
14
main/udptl.c
|
@ -205,12 +205,12 @@ static int decode_open_type(uint8_t *buf, int limit, int *len, const uint8_t **p
|
||||||
{
|
{
|
||||||
int octet_cnt;
|
int octet_cnt;
|
||||||
int octet_idx;
|
int octet_idx;
|
||||||
int stat;
|
int length;
|
||||||
int i;
|
int i;
|
||||||
const uint8_t **pbuf;
|
const uint8_t **pbuf;
|
||||||
|
|
||||||
for (octet_idx = 0, *p_num_octets = 0; ; octet_idx += octet_cnt) {
|
for (octet_idx = 0, *p_num_octets = 0; ; octet_idx += octet_cnt) {
|
||||||
if ((stat = decode_length(buf, limit, len, &octet_cnt)) < 0)
|
if ((length = decode_length(buf, limit, len, &octet_cnt)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (octet_cnt > 0) {
|
if (octet_cnt > 0) {
|
||||||
*p_num_octets += octet_cnt;
|
*p_num_octets += octet_cnt;
|
||||||
|
@ -224,7 +224,7 @@ static int decode_open_type(uint8_t *buf, int limit, int *len, const uint8_t **p
|
||||||
*pbuf = &buf[*len];
|
*pbuf = &buf[*len];
|
||||||
*len += octet_cnt;
|
*len += octet_cnt;
|
||||||
}
|
}
|
||||||
if (stat == 0)
|
if (length == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -289,7 +289,7 @@ static int encode_open_type(uint8_t *buf, int *len, const uint8_t *data, int num
|
||||||
|
|
||||||
static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
|
static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
|
||||||
{
|
{
|
||||||
int stat;
|
int stat1;
|
||||||
int stat2;
|
int stat2;
|
||||||
int i;
|
int i;
|
||||||
int j;
|
int j;
|
||||||
|
@ -324,7 +324,7 @@ static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
|
||||||
ptr += 2;
|
ptr += 2;
|
||||||
|
|
||||||
/* Break out the primary packet */
|
/* Break out the primary packet */
|
||||||
if ((stat = decode_open_type(buf, len, &ptr, &ifp, &ifp_len)) != 0)
|
if ((stat1 = decode_open_type(buf, len, &ptr, &ifp, &ifp_len)) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
/* Decode error_recovery */
|
/* Decode error_recovery */
|
||||||
if (ptr + 1 > len)
|
if (ptr + 1 > len)
|
||||||
|
@ -339,7 +339,7 @@ static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
|
||||||
if ((stat2 = decode_length(buf, len, &ptr, &count)) < 0)
|
if ((stat2 = decode_length(buf, len, &ptr, &count)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
for (i = 0; i < count; i++) {
|
for (i = 0; i < count; i++) {
|
||||||
if ((stat = decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i])) != 0)
|
if ((stat1 = decode_open_type(buf, len, &ptr, &bufs[total_count + i], &lengths[total_count + i])) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
total_count += count;
|
total_count += count;
|
||||||
|
@ -411,7 +411,7 @@ static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
|
||||||
|
|
||||||
/* Decode the elements */
|
/* Decode the elements */
|
||||||
for (i = 0; i < entries; i++) {
|
for (i = 0; i < entries; i++) {
|
||||||
if ((stat = decode_open_type(buf, len, &ptr, &data, &s->rx[x].fec_len[i])) != 0)
|
if ((stat1 = decode_open_type(buf, len, &ptr, &data, &s->rx[x].fec_len[i])) != 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (s->rx[x].fec_len[i] > LOCAL_FAX_MAX_DATAGRAM)
|
if (s->rx[x].fec_len[i] > LOCAL_FAX_MAX_DATAGRAM)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue