| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Wrap unsafe libltdl calls with locking
https://github.com/gphoto/libgphoto2/issues/166
* 848: do not install internal header gphoto2-port-mutex.h
* 848: wrap symbol declarations in #ifdef _GPHOTO2_INTERNAL_CODE
* 848: Use proper include guard macro
* 848: Encapsulate the lock/unlock code inside functions
This hides the pthread usage as an implementation detail inside the
gpi_libltdl_lock() and gpi_libltdl_unlock() functions.
* 848: Rename from *-mutex.[ch] to *-locking.[ch]
The *-lock.[ch] name is implementation neutral.
* 848: update libgphoto2_port version number
* 848: internal headers do not require __cplusplus checks
* 848: add copyright comment at the beginning of *.[ch]
* 848: add an unlocked variant of gp_abilities_list_load_dir to avoid lots of unlock/lock codes
* 848: remove unnecessary whitespace addition
Co-authored-by: kadler15 <spurfan15@gmail.com>
Co-authored-by: Hans Ulrich Niedermann <hun@n-dimensional.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Factor out the i18n definitions into i18n.h include files:
One include file each for libgphoto2 and for libgphoto2_port.
This removes the complete
#ifdef ENABLE_NLS
# include <libintl.h>
# undef _
# define _(String) dgettext (GETTEXT_PACKAGE, String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
# else
# define N_(String) (String)
# endif
#else
# define _(String) (String)
# define N_(String) (String)
#endif
block (which in some occasions defines even more macros)
and replaces it with a single line
#include "libgphoto2/i18n.h"
for camlibs and libgphoto2 itself and with
#include "libgphoto2_port/i18n.h"
for iolibs and libgphoto2_port itself.
This gives us two central locations to change the defintions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
the regular get_config and set_config if not present
|
|
|
|
| |
gp_camera_list_config, gp_camera_set_single_config, gp_camera_get_single_config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rewrote the ptp_opensession error retry code
changed some more error logging handling
detailed:
a) yet another logging/cleanup patch improving the code and error log
readability in this specific situation:
* extend translate_ptp_results to better handle PTP_ERROR_IO
* log the failure of ptp_opensession
* make the ptp_opensession error handling code clearer
* don't report a 'ptp_port' error inside the CHECK_INIT macro
when gp_camera_init fails in gphoto-camera.c. There is no
port error string mechanism involved and the original error has
been reported already from inside camera_init
* don't report the source location when logging the error string
inside gp_context_error(). interesting would be the original
source location but that is not available there.
* remove one of two different strings conveying the same
information: 'No additional information available.' and
'No error description available'
* improve logging in existing CHECK_RESULT_OPEN_CLOSE macro
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15110 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) introduce C_PARAMS and C_PARAMS_MSG along the lines of C_MEM
2) replace CHECK_NULL with C_PARAMS
3) replace the pattern
if ( something ) return GP_ERROR_BAD_PARAMETERS;
with
C_PARAMS ( !something );
I went over the whole patch again to check that each 'something'
condition is really inverted, so I dare to suggest you don't have to
do that again ;).
4) replaced CHECK_LIST and CHECK_INDEX_RANGE with simple one-line
C_PARAMS(...) expressions
5) a couple of hunks look like this
- if (!inet_aton (buffer, &inp)) {
- fprintf(stderr,"failed to scan for addr in %s\n", buffer);
- return GP_ERROR_BAD_PARAMETERS;
- }
+ C_PARAMS_MSG (inet_aton (buffer, &inp),
so some 'lost' error messages get now properly piped into the gp_log
mechanism.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15103 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
| |
3) use the fact that realloc() is defined to simply malloc if the
first param is NULL, no need to manually distinguish between first and
later allocations.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15098 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
| |
2) don't check the pointer for NULL before calling free(), because
free() checks it again.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15097 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
| |
here is a patch for (mostly) consistent usage of a generalized C_MEM
macro for checking the return values of memory allocating functions,
i.e. malloc, calloc, realloc and strdup. It is the C_MEM from
libusb1.c, moved to gphoto2-port-log.h.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15096 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
7, 8, 9) same 3,4,5 but for libgphoto core
3, 4) strictly replacing gp_log( GP_LOG_DEBUG/ERROR, ... with
GP_LOG_D/E in the libgphoto2 code. they are simple regex-replace
patches.
5) fix some whitespace issues caused by 3 and 4 and remove any _(...)
gettext macro usage for log messages
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15085 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15016 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14851 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14631 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14630 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14610 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14404 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13245 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13242 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13070 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
| |
(draft)
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12848 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12828 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12623 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12532 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
| |
Changed GP_UDEV to only enable UDEV support if libusb is available.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12349 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
| |
added a new CAPTURE_COMPLETE event for wait_for_event.
some deprecated stuff removed.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11958 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- removed "type" from CameraFile handling:
- all put_file functions and hooks get "type" as argument now
- added type to the set_file_info_noop call
- started removal of "name" from CameraFile
- generate new filename from original filename + camerafile type + mimetype
- new gp_camera_autodetect() helper function
- adapted all drivers.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11818 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
| |
and callers.
* added filename argument to put_file_func,
set_info_noop and set_file_noop functions.
adjusted all camlibs
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11773 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
| |
- libgphoto2_port rewritten for new GPPortInfo.
- camlibs/directory and camlibs/ptp2 adjusted.
- libgphoto2/ adjusted for the changed GPPortInfo list handling.
- configure.ac adjusted, NEWS adjusted
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10990 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10643 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
| |
gp_filesystem_get_storageinfo()
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10633 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10576 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10342 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10302 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10288 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10144 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9830 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
|
| |
This moves the header files to a new subdirectory gphoto2 in both
libgphoto2 and libphoto2_port/libgphoto2. All references are
adapted appropriately.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9221 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
| |
Fix typos. Original patch do not apply cleanly
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9198 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9094 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
| |
removed the literal (c) symbol.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8818 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8813 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
| |
Edward Flick <eddy@cdf-imaging.com>
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8647 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8099 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
|
|
|
|
|
| |
HAVE_LTDL is only defined if we are using the system libltdl, so we
cannot use it for conditionally either including ltdl.h or printing
an error message.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7923 67ed7778-7388-44ab-90cf-0a291f65f57c
|
|
|
|
| |
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7850 67ed7778-7388-44ab-90cf-0a291f65f57c
|