Fixed SSID config bug

This commit is contained in:
Mark Qvist 2014-06-24 14:34:38 +02:00
parent eeb897e061
commit 9addf50a33
4 changed files with 758 additions and 756 deletions

View File

@ -398,7 +398,7 @@ void ss_serialCallback(void *_buffer, size_t length, Serial *ser, AX25Ctx *ctx)
} else if (buffer[0] == 's' && length > 2) { } else if (buffer[0] == 's' && length > 2) {
buffer++; length--; buffer++; length--;
if (buffer[0] == 'c') { if (buffer[0] == 'c') {
if (length > 2) { if (length > 2 && buffer[2] > 48 && buffer[2] < 58) {
CALL_SSID = 10+buffer[2]-48; CALL_SSID = 10+buffer[2]-48;
} else { } else {
CALL_SSID = buffer[1]-48; CALL_SSID = buffer[1]-48;
@ -407,7 +407,7 @@ void ss_serialCallback(void *_buffer, size_t length, Serial *ser, AX25Ctx *ctx)
if (!VERBOSE && !SILENT) kprintf("1\n"); if (!VERBOSE && !SILENT) kprintf("1\n");
} }
if (buffer[0] == 'd') { if (buffer[0] == 'd') {
if (length > 2) { if (length > 2 && buffer[2] > 48 && buffer[2] < 58) {
DST_SSID = 10+buffer[2]-48; DST_SSID = 10+buffer[2]-48;
} else { } else {
DST_SSID = buffer[1]-48; DST_SSID = buffer[1]-48;
@ -415,7 +415,7 @@ void ss_serialCallback(void *_buffer, size_t length, Serial *ser, AX25Ctx *ctx)
if (VERBOSE) kprintf("Destination: %.6s-%d\n", DST, DST_SSID); if (VERBOSE) kprintf("Destination: %.6s-%d\n", DST, DST_SSID);
if (!VERBOSE && !SILENT) kprintf("1\n"); if (!VERBOSE && !SILENT) kprintf("1\n");
} }
if (buffer[0] == '1') { if (buffer[0] == '1' && buffer[2] > 48 && buffer[2] < 58) {
if (length > 2) { if (length > 2) {
PATH1_SSID = 10+buffer[2]-48; PATH1_SSID = 10+buffer[2]-48;
} else { } else {
@ -424,7 +424,7 @@ void ss_serialCallback(void *_buffer, size_t length, Serial *ser, AX25Ctx *ctx)
if (VERBOSE) kprintf("Path1: %.6s-%d\n", PATH1, PATH1_SSID); if (VERBOSE) kprintf("Path1: %.6s-%d\n", PATH1, PATH1_SSID);
if (!VERBOSE && !SILENT) kprintf("1\n"); if (!VERBOSE && !SILENT) kprintf("1\n");
} }
if (buffer[0] == '2') { if (buffer[0] == '2' && buffer[2] > 48 && buffer[2] < 58) {
if (length > 2) { if (length > 2) {
PATH2_SSID = 10+buffer[2]-48; PATH2_SSID = 10+buffer[2]-48;
} else { } else {

View File

@ -1,2 +1,2 @@
#define VERS_BUILD 2221 #define VERS_BUILD 2224
#define VERS_HOST "shard" #define VERS_HOST "shard"

Binary file not shown.

File diff suppressed because it is too large Load Diff