aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mh.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-10-16 09:00:34 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-10-16 09:00:34 +0000
commit441fdff85f0b2887e2e7206101822da822193b3c (patch)
treef62b497fd14626e8c14cb7876500ab9d6fb8e7f5 /libsylph/mh.c
parent1d0b765f618f4791d75a1226756d4568ca35be3c (diff)
libsylph: use itos_buf() because itos() is not thread-safe.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2286 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/mh.c')
-rw-r--r--libsylph/mh.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libsylph/mh.c b/libsylph/mh.c
index 2618626b..71eb2a26 100644
--- a/libsylph/mh.c
+++ b/libsylph/mh.c
@@ -351,6 +351,7 @@ static gchar *mh_fetch_msg(Folder *folder, FolderItem *item, gint num)
{
gchar *path;
gchar *file;
+ gchar buf[16];
g_return_val_if_fail(item != NULL, NULL);
g_return_val_if_fail(num > 0, NULL);
@@ -364,7 +365,7 @@ static gchar *mh_fetch_msg(Folder *folder, FolderItem *item, gint num)
return NULL;
path = folder_item_get_path(item);
- file = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL);
+ file = g_strconcat(path, G_DIR_SEPARATOR_S, itos_buf(buf, num), NULL);
g_free(path);
if (!is_file_exist(file)) {
g_free(file);
@@ -930,8 +931,9 @@ static gboolean mh_is_msg_changed(Folder *folder, FolderItem *item,
MsgInfo *msginfo)
{
struct stat s;
+ gchar buf[16];
- if (g_stat(itos(msginfo->msgnum), &s) < 0 ||
+ if (g_stat(itos_buf(buf, msginfo->msgnum), &s) < 0 ||
msginfo->size != s.st_size ||
msginfo->mtime != s.st_mtime)
return TRUE;