diff libgaim/protocols/msn/msn-utils.c @ 20391:0b0ecee55091

The second msn.tgz from SF Patch #1621854 from Ka-Hing Cheung. "new version, fixes some crashes because group_id is char * but in some places it's set to an int (!). skadotnet, I don't understand why you need `if (!strcmp(type, "MFN")) {` in so many places, so I didn't include most of them. I also have different versions of some of your fixes because I already fixed them. Group manipulations may still not work, at least it's not crashing :-)" committer: Richard Laager <rlaager@wiktel.com>
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 15 Apr 2007 02:43:47 +0000
parents e354528c4163
children 9ba7dee775e1
line wrap: on
line diff
--- a/libgaim/protocols/msn/msn-utils.c	Sun Apr 15 02:18:17 2007 +0000
+++ b/libgaim/protocols/msn/msn-utils.c	Sun Apr 15 02:43:47 2007 +0000
@@ -26,6 +26,8 @@
 #include "time.h"
 //#include <openssl/md5.h>
 
+char *rand_guid(void);
+
 /**************************************************************************
  * Util
  **************************************************************************/
@@ -150,12 +152,12 @@
  * Currently only support the UTF-8 and base64 encode
  */
 char *
-msn_encode_mime(char *str)
+msn_encode_mime(const char *str)
 {
 	char *base64;
 	
-	base64 = gaim_base64_encode(str,strlen(str));
-	return g_strdup_printf("=?utf-8?B?%s?=",base64);
+	base64 = gaim_base64_encode((guchar *)str, strlen(str));
+	return g_strdup_printf("=?utf-8?B?%s?=", base64);
 }
 
 /*
@@ -549,7 +551,7 @@
 # endif  /* GCC.  */
 #endif  /* Not __P.  */
 
-#if ! HAVE_LOCALTIME_R && ! defined localtime_r
+#if defined(HAVE_LOCALTIME_R) && ! HAVE_LOCALTIME_R && ! defined localtime_r
 # ifdef _LIBC
 #  define localtime_r __localtime_r
 # else