resolve some pointer signedness warnings
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
parent
b8481e8103
commit
833a8c825c
10
rtp.c
10
rtp.c
|
@ -302,8 +302,8 @@ static const char *stun_attr2str(int msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct stun_state {
|
struct stun_state {
|
||||||
unsigned char *username;
|
const char *username;
|
||||||
unsigned char *password;
|
const char *password;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int stun_process_attr(struct stun_state *state, struct stun_attr *attr)
|
static int stun_process_attr(struct stun_state *state, struct stun_attr *attr)
|
||||||
|
@ -313,10 +313,10 @@ static int stun_process_attr(struct stun_state *state, struct stun_attr *attr)
|
||||||
stun_attr2str(ntohs(attr->attr)), ntohs(attr->attr), ntohs(attr->len));
|
stun_attr2str(ntohs(attr->attr)), ntohs(attr->attr), ntohs(attr->len));
|
||||||
switch(ntohs(attr->attr)) {
|
switch(ntohs(attr->attr)) {
|
||||||
case STUN_USERNAME:
|
case STUN_USERNAME:
|
||||||
state->username = (unsigned char *)(attr->value);
|
state->username = (const char *) (attr->value);
|
||||||
break;
|
break;
|
||||||
case STUN_PASSWORD:
|
case STUN_PASSWORD:
|
||||||
state->password = (unsigned char *)(attr->value);
|
state->password = (const char *) (attr->value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (stundebug)
|
if (stundebug)
|
||||||
|
@ -455,7 +455,7 @@ static int stun_handle_packet(int s, struct sockaddr_in *src, unsigned char *dat
|
||||||
case STUN_BINDREQ:
|
case STUN_BINDREQ:
|
||||||
if (stundebug)
|
if (stundebug)
|
||||||
ast_verbose("STUN Bind Request, username: %s\n",
|
ast_verbose("STUN Bind Request, username: %s\n",
|
||||||
st.username ? (const char *)st.username : "<none>");
|
st.username ? st.username : "<none>");
|
||||||
if (st.username)
|
if (st.username)
|
||||||
append_attr_string(&attr, STUN_USERNAME, st.username, &resplen, &respleft);
|
append_attr_string(&attr, STUN_USERNAME, st.username, &resplen, &respleft);
|
||||||
append_attr_address(&attr, STUN_MAPPED_ADDRESS, src, &resplen, &respleft);
|
append_attr_address(&attr, STUN_MAPPED_ADDRESS, src, &resplen, &respleft);
|
||||||
|
|
Loading…
Reference in New Issue