diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-01-08 00:52:56 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-01-08 00:52:56 +0000 |
commit | e1b13312f975f38d3d7437f28299912eff6947e0 (patch) | |
tree | 563d1d7937ce87915e2055d9b2f1dae37d2b9b71 /src/bencode.c | |
parent | 0a1fa495bd2186c2004fbc0f8977fe52a5f82168 (diff) |
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.
Diffstat (limited to 'src/bencode.c')
-rw-r--r-- | src/bencode.c | 6 |
1 files changed, 3 insertions, 3 deletions
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) |