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:
Sean Bright 2008-08-10 20:57:25 +00:00
parent 790fde68d9
commit 74bf61579f
4 changed files with 378 additions and 378 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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',
* 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();
/*ast_debug(1, "TV -> %lu,%lu\n", tv->tv_sec, tv->tv_usec);*/
if (ast_tvzero(*tv)) /* not supplied, default to now */
*tv = now;
*tv = ast_tvadd(*tv, ast_samp2tv(when, 1000));
if (ast_tvcmp(*tv, now) < 0) {
if (ast_tvzero(*t)) /* not supplied, default to now */
*t = now;
*t = ast_tvadd(*t, ast_samp2tv(when, 1000));
if (ast_tvcmp(*t, now) < 0) {
ast_debug(1, "Request to schedule in the past?!?!\n");
*tv = now;
*t = now;
}
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)
{
struct sched *q;
struct timeval tv = ast_tvnow();
struct timeval when = ast_tvnow();
#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);
#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, "+-----+-----------------+-----------------+-----------------+\n");
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",
q->id,
@ -458,7 +458,7 @@ void ast_sched_dump(const struct sched_context *con)
int ast_sched_runq(struct sched_context *con)
{
struct sched *current;
struct timeval tv;
struct timeval when;
int numevents;
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
* close together.
*/
tv = ast_tvadd(ast_tvnow(), ast_tv(0, 1000));
if (ast_tvcmp(AST_DLLIST_FIRST(&con->schedq)->when, tv) != -1)
when = ast_tvadd(ast_tvnow(), ast_tv(0, 1000));
if (ast_tvcmp(AST_DLLIST_FIRST(&con->schedq)->when, when) != -1)
break;
current = AST_DLLIST_REMOVE_HEAD(&con->schedq, list);

View File

@ -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;
char *name;
struct timeval tv;
struct timeval when;
struct timespec ts;
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;
}
ast_cli(a->fd, "\npinging %s ...", name);
tv = ast_tvadd((begin = ast_tvnow()), ast_samp2tv(1000, 1000));
ts.tv_sec = tv.tv_sec;
ts.tv_nsec = tv.tv_usec * 1000;
when = ast_tvadd((begin = ast_tvnow()), ast_samp2tv(1000, 1000));
ts.tv_sec = when.tv_sec;
ts.tv_nsec = when.tv_usec * 1000;
ast_mutex_lock(&cli_ping_cond_lock);
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);

View File

@ -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_idx;
int stat;
int length;
int i;
const uint8_t **pbuf;
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;
if (octet_cnt > 0) {
*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];
*len += octet_cnt;
}
if (stat == 0)
if (length == 0)
break;
}
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)
{
int stat;
int stat1;
int stat2;
int i;
int j;
@ -324,7 +324,7 @@ static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
ptr += 2;
/* 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;
/* Decode error_recovery */
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)
return -1;
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;
}
total_count += count;
@ -411,7 +411,7 @@ static int udptl_rx_packet(struct ast_udptl *s, uint8_t *buf, int len)
/* Decode the elements */
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;
if (s->rx[x].fec_len[i] > LOCAL_FAX_MAX_DATAGRAM)
return -1;