After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 474931 - factore out some code in the metadata consumer
factore out some code in the metadata consumer
Status: RESOLVED FIXED
Product: eog
Classification: Core
Component: general
2.19.x
Other Linux
: Normal normal
: ---
Assigned To: EOG Maintainers
EOG Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-08 19:05 UTC by Claudio Saavedra
Modified: 2007-09-10 03:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
factore out the code (3.19 KB, patch)
2007-09-08 19:13 UTC, Claudio Saavedra
committed Details | Review

Description Claudio Saavedra 2007-09-08 19:05:35 UTC
From bug #474710, I said:

"I also think the code should be factored out to a helper function, because it's the same bunch over and over again, only changing the destination chunk and the state."
Comment 1 Claudio Saavedra 2007-09-08 19:13:00 UTC
Created attachment 95186 [details] [review]
factore out the code

This patch factores out the code to a small helper function. 

I suspect that the code for the IPTC case is buggy, because it doesn't increase the iterator to be after the read buffer when it has read the data in one block. If that code is actually wrong, then it could use the helper function I added with this patch.

This patch introduces as well the fix to the crasher in #474710.
Comment 2 Lucas Rocha 2007-09-09 21:26:19 UTC
No need to care about IPTC at this point. The patch is ok. Go on and commit. Thanks!
Comment 3 Claudio Saavedra 2007-09-10 03:13:05 UTC
Thanks Lucas. Committed in trunk (rev. 4072).

2007-09-09  Claudio Saavedra  <csaavedra@alumnos.utalca.cl>

        * src/eog-metadata-reader.c: (+eog_metadata_reader_get_next_block),
        (eog_metadata_reader_consume): Factore out some common code for 
        the different metadata sources in the matadata consumer. 
        Fixes bug #474931.