From e1b13312f975f38d3d7437f28299912eff6947e0 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Sun, 8 Jan 2012 00:52:56 +0000 Subject: fix the performance problems with the torrent add dialog on torrents with many files/dirs. the parent size updates just walks up parents rather than a full foreach, and the inserts try to use the previous update to speed up finding/creating the directories. I'll probably do something similar to the main files treeview. --- src/bencode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/bencode.c') diff --git a/src/bencode.c b/src/bencode.c index c9c9b6a..b6d64af 100644 --- a/src/bencode.c +++ b/src/bencode.c @@ -180,12 +180,12 @@ be_node *be_decode(const char *data) return be_decoden(data, strlen(data)); } -int be_validate_node(be_node * node, int type) +gboolean be_validate_node(be_node * node, gint type) { if (!node || node->type != type) - return 1; + return FALSE; else - return 0; + return TRUE; } static inline void _be_free_str(char *str) -- cgit v1.2.3