|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2015-2021 by Jonathan Naylor G4KLX |
| 2 | + * Copyright (C) 2015-2021,2023 by Jonathan Naylor G4KLX |
3 | 3 | *
|
4 | 4 | * This program is free software; you can redistribute it and/or modify
|
5 | 5 | * it under the terms of the GNU General Public License as published by
|
@@ -75,7 +75,7 @@ static void sigHandler2(int signum)
|
75 | 75 | const char* HEADER1 = "This software is for use on amateur radio networks only,";
|
76 | 76 | const char* HEADER2 = "it is to be used for educational purposes only. Its use on";
|
77 | 77 | const char* HEADER3 = "commercial networks is strictly prohibited.";
|
78 |
| -const char* HEADER4 = "Copyright(C) 2015-2021 by Jonathan Naylor, G4KLX and others"; |
| 78 | +const char* HEADER4 = "Copyright(C) 2015-2023 by Jonathan Naylor, G4KLX and others"; |
79 | 79 |
|
80 | 80 | int main(int argc, char** argv)
|
81 | 81 | {
|
@@ -112,15 +112,24 @@ int main(int argc, char** argv)
|
112 | 112 |
|
113 | 113 | delete host;
|
114 | 114 |
|
115 |
| - if (m_signal == 2) |
116 |
| - ::LogInfo("MMDVMHost-%s exited on receipt of SIGINT", VERSION); |
117 |
| - |
118 |
| - if (m_signal == 15) |
119 |
| - ::LogInfo("MMDVMHost-%s exited on receipt of SIGTERM", VERSION); |
120 |
| - |
121 |
| - if (m_signal == 1) |
122 |
| - ::LogInfo("MMDVMHost-%s is restarting on receipt of SIGHUP", VERSION); |
123 |
| - } while (m_signal == 1); |
| 115 | + switch (m_signal) { |
| 116 | + case 2: |
| 117 | + ::LogInfo("MMDVMHost-%s exited on receipt of SIGINT", VERSION); |
| 118 | + break; |
| 119 | + case 15: |
| 120 | + ::LogInfo("MMDVMHost-%s exited on receipt of SIGTERM", VERSION); |
| 121 | + break; |
| 122 | + case 1: |
| 123 | + ::LogInfo("MMDVMHost-%s exited on receipt of SIGHUP", VERSION); |
| 124 | + break; |
| 125 | + case 10: |
| 126 | + ::LogInfo("MMDVMHost-%s is restarting on receipt of SIGUSR1", VERSION); |
| 127 | + break; |
| 128 | + default: |
| 129 | + ::LogInfo("MMDVMHost-%s exited on receipt of an unknown signal", VERSION); |
| 130 | + break; |
| 131 | + } |
| 132 | + } while (m_signal == 10); |
124 | 133 |
|
125 | 134 | ::LogFinalise();
|
126 | 135 |
|
|
0 commit comments