Skip to content

Commit ab0c2e1

Browse files
authored
Update allsky_common.cpp: Handle EXIT_STOP in closeUp()
1 parent ee3bb54 commit ab0c2e1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/allsky_common.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ void closeUp(int e)
568568

569569
if (e == EXIT_RESTARTING)
570570
(void) displayNotificationImage("--expires 15 Restarting &");
571-
else if (e == EXIT_OK)
571+
else if (e == EXIT_OK || e == EXIT_STOP)
572572
(void) displayNotificationImage("--expires 2 NotRunning &");
573573
else
574574
(void) displayNotificationImage("--expires 0 Error &");
@@ -578,7 +578,11 @@ void closeUp(int e)
578578
sleep(3);
579579

580580
printf(" ***** %s Allsky", a);
581-
if (e != EXIT_OK) printf(" (code %d)", e);
581+
if (e == EXIT_STOP) {
582+
printf(" after %d image%s.", CG.maxImages, CG.maxImages == 1 ? "" : "s");
583+
} else if (e != EXIT_OK) {
584+
printf(" (code %d)", e);
585+
}
582586
printf(" *****\n");
583587

584588
// ZWO seems to hang on ASICloseCamera() if taking a picture when the signal is sent,

0 commit comments

Comments
 (0)