summaryrefslogtreecommitdiff
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
authorMichael L. Young <elgueromexicano@gmail.com>2013-10-02 21:33:42 +0000
committerMichael L. Young <elgueromexicano@gmail.com>2013-10-02 21:33:42 +0000
commite4ed9886e6527cab3858f45e8ba2d5f11a9aed08 (patch)
tree4b45ac8eb8dc5064fcc0d89ca45855271fa99942 /channels/chan_iax2.c
parent6e2b1a54ab3b3a088fa6414f4d9e4a9206aab734 (diff)
Cast Integer Argument To Unsigned Char
The member reg in the peercnt structure is an unsigned char and peercnt_modify() is expecting an unsigned char argument which gets assigned to peercnt->reg. This patch fixes that by casting the integer argument being passed to peercnt_modify to unsigned char. ........ Merged revisions 400314 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 400315 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 400316 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 62888615f..551c2046d 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -8615,7 +8615,7 @@ static void __expire_registry(const void *data)
"cause", "Expired");
ast_endpoint_blob_publish(peer->endpoint, ast_endpoint_state_type(), blob);
/* modify entry in peercnts table as _not_ registered */
- peercnt_modify(0, 0, &peer->addr);
+ peercnt_modify((unsigned char) 0, 0, &peer->addr);
/* Reset the address */
memset(&peer->addr, 0, sizeof(peer->addr));
/* Reset expiry value */
@@ -8759,7 +8759,7 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i
}
/* modify entry in peercnts table as _not_ registered */
- peercnt_modify(0, 0, &p->addr);
+ peercnt_modify((unsigned char) 0, 0, &p->addr);
/* Stash the IP address from which they registered */
ast_sockaddr_from_sin(&p->addr, sin);
@@ -8796,7 +8796,7 @@ static int update_registry(struct sockaddr_in *sin, int callno, char *devtype, i
/* modify entry in peercnts table as registered */
if (p->maxcallno) {
- peercnt_modify(1, p->maxcallno, &p->addr);
+ peercnt_modify((unsigned char) 1, p->maxcallno, &p->addr);
}
/* Make sure our call still exists, an INVAL at the right point may make it go away */
@@ -12417,7 +12417,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
peer->pokefreqok = DEFAULT_FREQ_OK;
peer->pokefreqnotok = DEFAULT_FREQ_NOTOK;
peer->maxcallno = 0;
- peercnt_modify(0, 0, &peer->addr);
+ peercnt_modify((unsigned char) 0, 0, &peer->addr);
peer->calltoken_required = CALLTOKEN_DEFAULT;
ast_string_field_set(peer,context,"");
ast_string_field_set(peer,peercontext,"");
@@ -12605,7 +12605,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
if (sscanf(v->value, "%10hu", &peer->maxcallno) != 1) {
ast_log(LOG_WARNING, "maxcallnumbers must be set to a valid number. %s is not valid at line %d.\n", v->value, v->lineno);
} else {
- peercnt_modify(1, peer->maxcallno, &peer->addr);
+ peercnt_modify((unsigned char) 1, peer->maxcallno, &peer->addr);
}
} else if (!strcasecmp(v->name, "requirecalltoken")) {
/* default is required unless in optional ip list */