From: <mar...@us...> - 2013-04-05 17:16:16
|
Revision: 14309 http://sourceforge.net/p/gphoto/code/14309 Author: marcusmeissner Date: 2013-04-05 17:16:09 +0000 (Fri, 05 Apr 2013) Log Message: ----------- handle "ms" and "s" correctly Modified Paths: -------------- trunk/gphoto2/gphoto2/actions.c Modified: trunk/gphoto2/gphoto2/actions.c =================================================================== --- trunk/gphoto2/gphoto2/actions.c 2013-04-04 06:59:29 UTC (rev 14308) +++ trunk/gphoto2/gphoto2/actions.c 2013-04-05 17:16:09 UTC (rev 14309) @@ -1089,9 +1089,9 @@ wp.u.milliseconds = x; printf ( _("Waiting for %d milliseconds for events from camera. Press Ctrl-C to abort.\n"), x); } - if ((arg[strlen(arg)-1]=='s') && sscanf(arg,"%ds", &x)) { /* exact seconds */ - wp.type = WAIT_TIME; - wp.u.milliseconds = x*1000; + if ((wp.type != WAIT_TIME) && (arg[strlen(arg)-1]=='s') && sscanf(arg,"%ds", &x)) { /* exact seconds */ + wp.type = WAIT_TIME; + wp.u.milliseconds = x*1000; printf ( _("Waiting for %d seconds for events from camera. Press Ctrl-C to abort.\n"), x); } if (wp.type == WAIT_EVENTS) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |