[Freeswitch-svn] [commit] r4856 - freeswitch/trunk/libs/libdingaling/src

Freeswitch SVN mikej at freeswitch.org
Thu Apr 5 06:23:09 EDT 2007


Author: mikej
Date: Thu Apr  5 06:23:09 2007
New Revision: 4856

Modified:
   freeswitch/trunk/libs/libdingaling/src/libdingaling.c

Log:
var types, use zize_t for lengths.

Modified: freeswitch/trunk/libs/libdingaling/src/libdingaling.c
==============================================================================
--- freeswitch/trunk/libs/libdingaling/src/libdingaling.c	(original)
+++ freeswitch/trunk/libs/libdingaling/src/libdingaling.c	Thu Apr  5 06:23:09 2007
@@ -43,6 +43,7 @@
 #include <stdlib.h>
 #include <assert.h>
 #include <ctype.h>
+#include <fcntl.h>
 #include <iksemel.h>
 #include <apr.h>
 #include <apr_network_io.h>
@@ -72,6 +73,7 @@
 #include "sha1.h"
 
 #ifdef _MSC_VER
+#include <io.h>
 #pragma warning(disable:4127 4706)
 #endif
 
@@ -833,7 +835,10 @@
 	key = ldl_handle_strdup(handle, from);
 	ldl_strip_resource(key);
 
-	b64encode((unsigned char *)image, bytes, base64, sizeof(base64));
+	b64encode((unsigned char *)image,
+		bytes, 
+		base64, 
+		sizeof(base64));
 	ap->base64 = strdup(base64);
 	apr_hash_set(globals.avatar_hash, ap->path, APR_HASH_KEY_STRING, ap);
 	apr_hash_set(globals.avatar_hash, key, APR_HASH_KEY_STRING, ap);
@@ -1080,10 +1085,10 @@
 static const char c64[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
 #define B64BUFFLEN 1024
 
-static int b64encode(unsigned char *in, uint32_t ilen, unsigned char *out, uint32_t olen) 
+static int b64encode(unsigned char *in, size_t ilen, unsigned char *out, size_t olen) 
 {
 	int y=0,bytes=0;
-	uint32_t x=0;
+	size_t x=0;
 	unsigned int b=0,l=0;
 
 	for(x=0;x<ilen;x++) {



More information about the Freeswitch-svn mailing list