mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-26 03:36:40 +00:00
tweak some var types to silence warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4941 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
527ef0f588
commit
1547637ba8
@ -733,7 +733,7 @@ static ldl_avatar_t *ldl_get_avatar(ldl_handle_t *handle, char *path, char *from
|
|||||||
assert(ap != NULL);
|
assert(ap != NULL);
|
||||||
memset(ap, 0, sizeof(*ap));
|
memset(ap, 0, sizeof(*ap));
|
||||||
ldl_random_string(hash, sizeof(hash) -1, NULL);
|
ldl_random_string(hash, sizeof(hash) -1, NULL);
|
||||||
sha1_hash(ap->hash, hash, strlen(hash));
|
sha1_hash(ap->hash, hash, (unsigned)strlen(hash));
|
||||||
ap->path = strdup(path);
|
ap->path = strdup(path);
|
||||||
|
|
||||||
key = ldl_handle_strdup(handle, from);
|
key = ldl_handle_strdup(handle, from);
|
||||||
@ -1051,7 +1051,7 @@ static int on_stream_component(ldl_handle_t *handle, int type, iks *node)
|
|||||||
char handshake[512] = "";
|
char handshake[512] = "";
|
||||||
|
|
||||||
snprintf(secret, sizeof(secret), "%s%s", pak->id, handle->password);
|
snprintf(secret, sizeof(secret), "%s%s", pak->id, handle->password);
|
||||||
sha1_hash(hash, secret, strlen(secret));
|
sha1_hash(hash, secret, (unsigned)strlen(secret));
|
||||||
snprintf(handshake, sizeof(handshake), "<handshake>%s</handshake>", hash);
|
snprintf(handshake, sizeof(handshake), "<handshake>%s</handshake>", hash);
|
||||||
iks_send_raw(handle->parser, handshake);
|
iks_send_raw(handle->parser, handshake);
|
||||||
handle->state = CS_START;
|
handle->state = CS_START;
|
||||||
@ -1862,10 +1862,8 @@ char *ldl_handle_probe(ldl_handle_t *handle, char *id, char *from, char *buf, un
|
|||||||
iks *pres, *msg;
|
iks *pres, *msg;
|
||||||
char *lid = NULL, *low_id = NULL;
|
char *lid = NULL, *low_id = NULL;
|
||||||
struct ldl_buffer buffer;
|
struct ldl_buffer buffer;
|
||||||
time_t started;
|
time_t started, elapsed, next = 0;
|
||||||
unsigned int elapsed;
|
|
||||||
char *notice = "Call Me!";
|
char *notice = "Call Me!";
|
||||||
int next = 0;
|
|
||||||
|
|
||||||
buffer.buf = buf;
|
buffer.buf = buf;
|
||||||
buffer.len = len;
|
buffer.len = len;
|
||||||
|
@ -191,13 +191,15 @@ static inline int ldl_jid_domcmp(char *id_a, char *id_b)
|
|||||||
{
|
{
|
||||||
char *id_a_host, *id_b_host, *id_a_r, *id_b_r;
|
char *id_a_host, *id_b_host, *id_a_r, *id_b_r;
|
||||||
|
|
||||||
if ((id_a_host = strchr(id_a, '@'))) {
|
id_a_host = strchr(id_a, '@');
|
||||||
|
if (id_a_host) {
|
||||||
id_a_host++;
|
id_a_host++;
|
||||||
} else {
|
} else {
|
||||||
id_a_host = id_a;
|
id_a_host = id_a;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((id_b_host = strchr(id_b, '@'))) {
|
id_b_host = strchr(id_b, '@');
|
||||||
|
if (id_b_host) {
|
||||||
id_b_host++;
|
id_b_host++;
|
||||||
} else {
|
} else {
|
||||||
id_b_host = id_b;
|
id_b_host = id_b;
|
||||||
@ -206,13 +208,15 @@ static inline int ldl_jid_domcmp(char *id_a, char *id_b)
|
|||||||
if (id_a_host && id_b_host) {
|
if (id_a_host && id_b_host) {
|
||||||
size_t id_a_len = 0, id_b_len = 0, len = 0;
|
size_t id_a_len = 0, id_b_len = 0, len = 0;
|
||||||
|
|
||||||
if ((id_a_r = strchr(id_a_host, '/'))) {
|
id_a_r = strchr(id_a_host, '/');
|
||||||
|
if (id_a_r) {
|
||||||
id_a_len = id_a_r - id_a_host;
|
id_a_len = id_a_r - id_a_host;
|
||||||
} else {
|
} else {
|
||||||
id_a_len = strlen(id_a_host);
|
id_a_len = strlen(id_a_host);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((id_b_r = strchr(id_b_host, '/'))) {
|
id_b_r = strchr(id_b_host, '/');
|
||||||
|
if (id_b_r) {
|
||||||
id_b_len = id_b_r - id_b_host;
|
id_b_len = id_b_r - id_b_host;
|
||||||
} else {
|
} else {
|
||||||
id_b_len = strlen(id_b_host);
|
id_b_len = strlen(id_b_host);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user