X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2Fset_oeminfo.c;h=3d137a3fd3d6e2c1db7a4272dea256104d2fd32a;hb=refs%2Ftags%2Fupstream%2F1.5;hp=5b4241c2a953ca62b20b37a6a76d871c1c7e2c0d;hpb=63444196dd1edb154f81d9418b3d0bc2367163e5;p=ap-utils.git diff --git a/lib/set_oeminfo.c b/lib/set_oeminfo.c index 5b4241c..3d137a3 100644 --- a/lib/set_oeminfo.c +++ b/lib/set_oeminfo.c @@ -1,7 +1,7 @@ /* - * sysinfo_set.c from Access Point SNMP Utils for Linux + * set_oeminfo.c from Access Point SNMP Utils for Linux * - * Copyright (c) Jan Rafaj + * Copyright (c) 2005 Jan Rafaj * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License Version 2 from @@ -159,7 +159,7 @@ void atmel_set_oeminfo() st_len = varbinds[0].len_val; - if (st_len == 128) { /* SHORTst */ + if (st_len == 92 || st_len == 128) { /* SHORTst */ memcpy(&str128, varbinds[0].value, sizeof(struct sysDeviceInfo_128)); StructVersion = str128.StructVersion; @@ -262,11 +262,11 @@ void atmel_set_oeminfo() waddstr(main_sub, message); } - sprintf(message, "Vendor ID: 0x%04X", (PID_VID[0] & 0xFF) | + sprintf(message, "USB Vendor ID: 0x%04X", (PID_VID[0] & 0xFF) | ((PID_VID[1] & 0xFF) << 8)); mvwaddstr(main_sub, 16, 0, message); - sprintf(message, "Product ID: 0x%04X", (PID_VID[2] & 0xFF) | + sprintf(message, "USB Product ID: 0x%04X", (PID_VID[2] & 0xFF) | ((PID_VID[3] & 0xFF) << 8)); mvwaddstr(main_sub, 17, 0, message); @@ -348,7 +348,7 @@ void atmel_set_oeminfo() continue; case 'o': case 'O': - if (st_len == 128) + if (st_len == 92 || st_len == 128) continue; get_value(CountryCode, 10, strlen(S_COUNTRYC), 3, ANY_STRING, @@ -356,7 +356,7 @@ void atmel_set_oeminfo() continue; case 'c': case 'C': - if (st_len == 128) + if (st_len == 92 || st_len == 128) continue; Channel = menu_choose(11 - regdom_types[rd_idx].chans / 2, @@ -372,7 +372,7 @@ void atmel_set_oeminfo() continue; case 'a': case 'A': - if (st_len == 128) + if (st_len == 92 || st_len == 128) continue; get_value(message, 12, strlen(S_CHANNELS), 3, INT_STRING, 1, 14, @@ -386,7 +386,7 @@ void atmel_set_oeminfo() continue; case 'p': case 'P': - if (st_len == 128) + if (st_len == 92 || st_len == 128) continue; get_value(message, 13, strlen(S_TXPOWER), 4, INT_STRING, 0, 255, @@ -415,7 +415,7 @@ void atmel_set_oeminfo() varbinds[0].len_oid = sizeof(sysDeviceInfo); varbinds[0].type = STRING_VALUE; - if (st_len == 128) { /* SHORTst */ + if (st_len == 92 || st_len == 128) { /* SHORTst */ str128.RegulatoryDomain = RegulatoryDomain; str128.ProductType = ProductType; str128.OEMID = OEMID; @@ -454,6 +454,8 @@ void atmel_set_oeminfo() } } + wbkgd(main_sub, A_NORMAL); + wrefresh(main_sub); print_help(DONE_SET); goto exit; }