Commit cda797d1bebaec4ad368a82f7a4321a89b9d2a81

Con Kolivas 2013-10-11T16:04:23

Avoid calling get_statline_before on exit to avoid trying to use it on drivers in an indeterminate state.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index 6a36b55..1de5e08 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -7085,6 +7085,7 @@ static void log_print_status(struct cgpu_info *cgpu)
 }
 
 static void noop_get_statline(char __maybe_unused *buf, size_t __maybe_unused bufsiz, struct cgpu_info __maybe_unused *cgpu);
+void blank_get_statline_before(char *buf, size_t bufsiz, struct cgpu_info __maybe_unused *cgpu);
 
 void print_summary(void)
 {
@@ -7157,6 +7158,7 @@ void print_summary(void)
 	for (i = 0; i < total_devices; ++i) {
 		struct cgpu_info *cgpu = get_devices(i);
 
+		cgpu->drv->get_statline_before = &blank_get_statline_before;
 		cgpu->drv->get_statline = &noop_get_statline;
 		log_print_status(cgpu);
 	}