]> git.0d.be Git - empathy.git/commit
Make sure to not infinite loop when scaling avatar.
authorXavier Claessens <xclaesse@gmail.com>
Thu, 20 May 2010 14:12:57 +0000 (16:12 +0200)
committerXavier Claessens <xclaesse@gmail.com>
Wed, 26 May 2010 09:54:01 +0000 (11:54 +0200)
commit4ba1a8de87f108ad073e388711c4d6b05009851e
treea98a1d4400f6b96ea29f8023aa3fb540043d7f79
parent1ea03406fc359c1623909ff6705c9c67b0e0c30b
Make sure to not infinite loop when scaling avatar.

1) Add a limit of 10 retries, to be sure to never do more in the worst case.
2) Only keep converted data that respect the requirements, make sure to not
accept bigger data than maximum_bytes, even if it is close to the limit.
3) Stop the loop if the new factor does not change the image resolution. That
means we already found the optimal size.

Fixes bug #619701
libempathy-gtk/empathy-avatar-chooser.c