[Freeswitch-svn] [commit] r4941 - freeswitch/trunk/libs/libdingaling/src
Freeswitch SVN
mikej at freeswitch.org
Mon Apr 16 09:33:46 EDT 2007
Author: mikej
Date: Mon Apr 16 09:33:45 2007
New Revision: 4941
Modified:
freeswitch/trunk/libs/libdingaling/src/libdingaling.c
freeswitch/trunk/libs/libdingaling/src/libdingaling.h
Log:
tweak some var types to silence warnings.
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c Mon Apr 16 09:33:45 2007
@@ -733,7 +733,7 @@
assert(ap != NULL);
memset(ap, 0, sizeof(*ap));
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);
key = ldl_handle_strdup(handle, from);
@@ -1051,7 +1051,7 @@
char handshake[512] = "";
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);
iks_send_raw(handle->parser, handshake);
handle->state = CS_START;
@@ -1862,10 +1862,8 @@
iks *pres, *msg;
char *lid = NULL, *low_id = NULL;
struct ldl_buffer buffer;
- time_t started;
- unsigned int elapsed;
+ time_t started, elapsed, next = 0;
char *notice = "Call Me!";
- int next = 0;
buffer.buf = buf;
buffer.len = len;
Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.h
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.h (original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.h Mon Apr 16 09:33:45 2007
@@ -191,13 +191,15 @@
{
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++;
} else {
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++;
} else {
id_b_host = id_b;
@@ -206,13 +208,15 @@
if (id_a_host && id_b_host) {
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;
} else {
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;
} else {
id_b_len = strlen(id_b_host);
More information about the Freeswitch-svn
mailing list