From: Andre Noll Date: Wed, 17 Dec 2008 22:32:21 +0000 (+0100) Subject: Fix a design bug concerning struct user_info. X-Git-Tag: v0.1.0~21 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;h=bd0166ae6242deafc9b3436199965420517033b5;hp=bd0166ae6242deafc9b3436199965420517033b5;p=adu.git Fix a design bug concerning struct user_info. It was a bad idea to include the accounting data (#files, #dirs, information about the user only. So move the accounting data to user_summary_info. This allows to get rid of the ugly uid_hash_table_sort_idx construct and of sort_hash_table(). These were only needed because of the broken design. We now never sort the hash table but allocate an array of user_summary_info structures on each query and sort that array instead. This patch not only simplifies code but also fixes a real bug noted by Sebastian Stark: If the user_summary was requested more than once in interactive mode, the old code computed incorrect values because the above mentioned accounting fields were only initialized once. The new code gets this right automatically because a fresh array is created on each query. ---