summaryrefslogtreecommitdiff
path: root/libgphoto2/camera.c
diff options
context:
space:
mode:
authorLutz Mueller <lutz@users.sourceforge.net>2001-09-22 10:05:09 +0000
committerLutz Mueller <lutz@users.sourceforge.net>2001-09-22 10:05:09 +0000
commit91e5af5a5d7db0561eba6bc26c83c2d96fdd5253 (patch)
tree26764c0b62a8535596e6f36c3bc632858cba593f /libgphoto2/camera.c
parent4e0061a1204f6db0a29504c598850c402d0430f1 (diff)
downloadlibgphoto2-91e5af5a5d7db0561eba6bc26c83c2d96fdd5253.tar.gz
2001-09-22 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
* camlibs/jamcam/.cvsignore: * camlibs/sonydscf55/.cvsignore: New * include/gphoto2-debug.h: * libgphoto2/debug.c: Debugging stuff can be found here. * frontends/command-line/main.c: Use gp_debug_set_level and don't use gp_init any more (this is done automatically). * include/Makefile.am: * libgphoto2/Makefile.am: Add the debugging files * include/gphoto2-core.h: Remove debugging and initialization stuff * libgphoto2/core.c: Make gp_init a static function. * (...) Various smaller changes regarding gp_init and gp_debug_*. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2301 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2/camera.c')
-rw-r--r--libgphoto2/camera.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libgphoto2/camera.c b/libgphoto2/camera.c
index 0bc000d6f..504a49016 100644
--- a/libgphoto2/camera.c
+++ b/libgphoto2/camera.c
@@ -27,6 +27,7 @@
#include "gphoto2-frontend.h"
#include "gphoto2-core.h"
#include "gphoto2-library.h"
+#include "gphoto2-debug.h"
#include <config.h>
#ifdef ENABLE_NLS
@@ -59,9 +60,11 @@ gp_camera_new (Camera **camera)
CHECK_NULL (camera);
- /* Be nice to frontend-writers... */
- if (!gp_is_initialized ())
- CHECK_RESULT (gp_init (GP_DEBUG_NONE));
+ /*
+ * Be nice to frontend-writers and call some core function to make
+ * sure libgphoto2 is initialized...
+ */
+ CHECK_RESULT (gp_camera_count ());
*camera = malloc (sizeof (Camera));
if (!*camera)