- if (len > 25) {
- /* Truncate (limited screen size) and screen-width independent! */
- start[COLS-53-atmel410_filter] = '>';
- start[COLS-52-atmel410_filter] = '\0';
+
+ /*
+ * Returned sysDescr string is (hopefully!) always of format:
+ * string1 (Ver. string2) string3
+ * where:
+ * string1 = "802.11 X "
+ * where: "X" identifies firmware type (AP, APP, WB, WA, etc)
+ * unfortunately this is not deterministic across
+ * manufacturers (each one uses different naming scheme)
+ * string2 = firmware version
+ * string3 = device name, as defined with operAccessPointName
+ * OID
+ name_p = strchr(start, ')');
+ *name_p = '\0';
+ name_p += 2;
+ fwver_p = strstr(start, "(Ver. ");
+ fwver_p += strlen("(Ver. ");
+ sprintf(name_fw, "%s (%s)", name_p, fwver_p);
+
+ if (strlen(name_fw) > (size_t)(COLS - MCOLS - 37)) {
+ name_fw[COLS - MCOLS - 38] = '>';
+ name_fw[COLS - MCOLS - 37] = '\0';
+ }
+ */
+
+ if (strlen(start) > (size_t)(COLS - MCOLS - 37)) {
+ /* truncate (limit to scr. size) */
+ start[COLS - MCOLS - 38] = '>';
+ start[COLS - MCOLS - 37] = '\0';