mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-14 13:58:38 +00:00
more fixes for gcc4 warnings ...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
10
srv.c
10
srv.c
@@ -44,7 +44,7 @@ struct srv {
|
|||||||
unsigned short portnum;
|
unsigned short portnum;
|
||||||
} __attribute__ ((__packed__));
|
} __attribute__ ((__packed__));
|
||||||
|
|
||||||
static int parse_srv(unsigned char *host, int hostlen, int *portno, unsigned char *answer, int len, unsigned char *msg)
|
static int parse_srv(char *host, int hostlen, int *portno, char *answer, int len, char *msg)
|
||||||
{
|
{
|
||||||
int res = 0;
|
int res = 0;
|
||||||
struct srv *srv = (struct srv *)answer;
|
struct srv *srv = (struct srv *)answer;
|
||||||
@@ -57,7 +57,7 @@ static int parse_srv(unsigned char *host, int hostlen, int *portno, unsigned cha
|
|||||||
answer += sizeof(struct srv);
|
answer += sizeof(struct srv);
|
||||||
len -= sizeof(struct srv);
|
len -= sizeof(struct srv);
|
||||||
|
|
||||||
if ((res = dn_expand(msg,answer + len,answer, repl, sizeof(repl) - 1)) < 0) {
|
if ((res = dn_expand((unsigned char *)msg, (unsigned char *)answer + len, (unsigned char *)answer, repl, sizeof(repl) - 1)) < 0) {
|
||||||
ast_log(LOG_WARNING, "Failed to expand hostname\n");
|
ast_log(LOG_WARNING, "Failed to expand hostname\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -70,9 +70,9 @@ static int parse_srv(unsigned char *host, int hostlen, int *portno, unsigned cha
|
|||||||
}
|
}
|
||||||
if (portno)
|
if (portno)
|
||||||
*portno = ntohs(srv->portnum);
|
*portno = ntohs(srv->portnum);
|
||||||
return(0);
|
return 0;
|
||||||
}
|
}
|
||||||
return(-1);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct srv_context {
|
struct srv_context {
|
||||||
@@ -81,7 +81,7 @@ struct srv_context {
|
|||||||
int *port;
|
int *port;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int srv_callback(void *context, u_char *answer, int len, u_char *fullanswer)
|
static int srv_callback(void *context, char *answer, int len, char *fullanswer)
|
||||||
{
|
{
|
||||||
struct srv_context *c = (struct srv_context *)context;
|
struct srv_context *c = (struct srv_context *)context;
|
||||||
|
|
||||||
|
|||||||
2
utils.c
2
utils.c
@@ -260,7 +260,7 @@ void ast_md5_hash(char *output, char *input)
|
|||||||
int x;
|
int x;
|
||||||
|
|
||||||
MD5Init(&md5);
|
MD5Init(&md5);
|
||||||
MD5Update(&md5, input, strlen(input));
|
MD5Update(&md5, (unsigned char *)input, strlen(input));
|
||||||
MD5Final(digest, &md5);
|
MD5Final(digest, &md5);
|
||||||
ptr = output;
|
ptr = output;
|
||||||
for (x=0; x<16; x++)
|
for (x=0; x<16; x++)
|
||||||
|
|||||||
Reference in New Issue
Block a user