Re: Found an error in the documentation

Marcus Meissner <[email protected]>
Newsgroups gmane.comp.multimedia.gphoto.user
Organization SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 212 84 (AG Nürnberg)
Message-ID <[email protected]>
On Sun, Apr 29, 2018 at 04:06:39PM -0400, Alan Corey wrote:
> At http://www.gphoto.org/doc/api/gphoto2-camera_8h.html#ae7b6050bb4bc7a697f9e07253c27710f
> and in the version I have for the 2.5.12 from Raspbian debs, it says
> that gp_camera_autodetect() returns a gphoto2 error code.
> 
> That's wrong, it returns a count sometimes.  Even in 2.5.17
> gp_camera_autodetect returns a gp_list_count when it's successful.
> Testing for a match to GP_OK will only work (maybe) if there are 0
> cameras detected.  If it's positive it's a count, if negative it's an
> error.  Testing for a non-zero return also won't work.

Yes, it is 0 -> n for count of detected cameras or <0 for an error.
I adjusted it in the code, will be published on next docu resync.

Ciao, Marcus

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.