From da90f34a78678d2be366d9f08ebbf1f0442e808a Mon Sep 17 00:00:00 2001 From: Lutz Mueller Date: Fri, 21 Dec 2001 16:45:45 +0000 Subject: [PATCH] =?UTF-8?q?2001-12-21=20=20Lutz=20M=EF=BF=BDller=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dc240.c: (camera_init): Kill some warnings. (camera_capture): Tell the filesystem about the new file. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3558 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/kodak/dc240/ChangeLog | 6 ++++++ camlibs/kodak/dc240/dc240.c | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/camlibs/kodak/dc240/ChangeLog b/camlibs/kodak/dc240/ChangeLog index b8832a72d..5315a2d7b 100644 --- a/camlibs/kodak/dc240/ChangeLog +++ b/camlibs/kodak/dc240/ChangeLog @@ -1,3 +1,9 @@ +2001-12-21 Lutz Müller + + * dc240.c: + (camera_init): Kill some warnings. + (camera_capture): Tell the filesystem about the new file. + 2001-12-20 Hubert Figuiere * library.c (dc240_load_status_data_to_table, dc240_get_status): diff --git a/camlibs/kodak/dc240/dc240.c b/camlibs/kodak/dc240/dc240.c index 409dec425..5089231c8 100644 --- a/camlibs/kodak/dc240/dc240.c +++ b/camlibs/kodak/dc240/dc240.c @@ -147,10 +147,22 @@ static int camera_capture (Camera *camera, CameraCaptureType type, CameraFilePath *path) { + int result; + if (type != GP_CAPTURE_IMAGE) return (GP_ERROR_NOT_SUPPORTED); - return dc240_capture(camera, path); + /* Capture the image */ + result = dc240_capture (camera, path); + if (result < 0) + return (result); + + /* Tell the filesystem about it */ + result = gp_filesystem_append (camera->fs, path->folder, path->name); + if (result < 0) + return (result); + + return (GP_OK); } static int @@ -229,7 +241,7 @@ camera_init (Camera *camera) gp_filesystem_set_file_funcs (camera->fs, get_file_func, delete_file_func, camera); - ret = gp_port_settings_get (camera->port, &settings); + ret = gp_port_get_settings (camera->port, &settings); if (ret < 0) return (ret); switch (camera->port->type) { @@ -254,11 +266,11 @@ camera_init (Camera *camera) return (GP_ERROR_UNKNOWN_PORT); } - ret = gp_port_settings_set (camera->port, settings); + ret = gp_port_set_settings (camera->port, settings); if (ret < 0) return (ret); - ret = gp_port_timeout_set (camera->port, TIMEOUT); + ret = gp_port_set_timeout (camera->port, TIMEOUT); if (ret < 0) return (ret);