Commit 75de555
committed
fix: handle inconsistent delimiter for SystemStatus
This commit fixes a bug where pfSense's get_load_average() function returns a load average string that changes based on the system's language setting. Previously, the numbers in the load average string might be separated by just a space, or by a comma and a space. This inconsistency caused an error when the API tried to convert that string into a usable array of values. Now, we're ensuring the load average string is always delimited by a single space, no matter what language pfSense is using. This prevents the logic error and ensures the API can correctly convert the load average to its intended array representation.cpu_load_average #716
1 parent 4412f17 commit 75de555
File tree
1 file changed
+20
-2
lines changed- pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models
1 file changed
+20
-2
lines changedLines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
226 | 244 | | |
227 | 245 | | |
228 | 246 | | |
| |||
0 commit comments