From: <mar...@us...> - 2013-05-21 07:56:33
|
Revision: 14427 http://sourceforge.net/p/gphoto/code/14427 Author: marcusmeissner Date: 2013-05-21 07:56:20 +0000 (Tue, 21 May 2013) Log Message: ----------- add code to suppress decoded config options from /other/ tree Modified Paths: -------------- trunk/libgphoto2/camlibs/ptp2/config.c Modified: trunk/libgphoto2/camlibs/ptp2/config.c =================================================================== --- trunk/libgphoto2/camlibs/ptp2/config.c 2013-05-21 07:55:46 UTC (rev 14426) +++ trunk/libgphoto2/camlibs/ptp2/config.c 2013-05-21 07:56:20 UTC (rev 14427) @@ -5940,7 +5940,6 @@ } } } - free (setprops); if (!params->deviceinfo.DevicePropertiesSupported_len) return GP_OK; @@ -5955,7 +5954,19 @@ char buf[20], *label; PTPDevicePropDesc dpd; CameraWidgetType type; + int j; + for (j=0;j<nrofsetprops;j++) + if (setprops[j] == propid) + break; +#if 0 /* enable this for suppression of generic properties for already decoded ones */ + if (j<nrofsetprops) { + gp_log (GP_LOG_DEBUG, "camera_get_config", "Property 0x%04x already handled before, skipping.", propid ); + continue; + } +#endif + + ret = ptp_getdevicepropdesc (params,propid,&dpd); if (ret != PTP_RC_OK) continue; @@ -6086,6 +6097,7 @@ gp_widget_append (section, widget); ptp_free_devicepropdesc(&dpd); } + free (setprops); return GP_OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |