changeset 209:d512d1d8712f

improved parrot blocker slightly.
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 23 Aug 2008 03:59:44 +0900
parents 5d1b8528e144
children 00e26402de03
files pidgin-twitter.c pidgin-twitter.h
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Fri Aug 22 22:35:03 2008 +0900
+++ b/pidgin-twitter.c	Sat Aug 23 03:59:44 2008 +0900
@@ -787,13 +787,13 @@
 
         if(wassr_ac) {
             /* store sending message to address parrot problem */
-            g_strlcpy(wassr_post, plain, WASSR_POST_LEN);
-            twitter_debug("wassr parrot pushed:%s\n", *buffer);
+            g_utf8_strncpy(wassr_post, plain, WASSR_POST_LEN);
+            twitter_debug("wassr parrot pushed:%s\n", plain);
         }
         else if(identica_ac) {
             /* store sending message to address parrot problem */
-            g_strlcpy(identica_post, plain, IDENTICA_POST_LEN);
-            twitter_debug("identica parrot pushed:%s\n", *buffer);
+            g_utf8_strncpy(identica_post, plain, IDENTICA_POST_LEN);
+            twitter_debug("identica parrot pushed:%s\n", plain);
         }
 
         g_free(*buffer);
@@ -2417,10 +2417,10 @@
     }
 
     /* allocate wassr_post */
-    wassr_post = g_new0(gchar, WASSR_POST_LEN + 1);
+    wassr_post = g_new0(gchar, 4 * WASSR_POST_LEN + 1);
 
     /* allocate identica_post */
-    identica_post = g_new0(gchar, IDENTICA_POST_LEN + 1);
+    identica_post = g_new0(gchar, 4 * IDENTICA_POST_LEN + 1);
 
     return TRUE;
 }
--- a/pidgin-twitter.h	Fri Aug 22 22:35:03 2008 +0900
+++ b/pidgin-twitter.h	Sat Aug 23 03:59:44 2008 +0900
@@ -168,7 +168,7 @@
 #define TWITTER_DEFAULT_ICON_URL "http://static.twitter.com/images/default_profile_bigger.png"
 
 /* wassr specific macros */
-#define WASSR_POST_LEN (255 * 4)
+#define WASSR_POST_LEN (255)
 #define IDENTICA_POST_LEN (140)
 
 /* misc macros */