X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstations.c;h=5211f40c9623a35269fef0c98b717aaf700876d2;hb=refs%2Ftags%2Fupstream%2F1.5.1.pre3;hp=b37463e33a826fe37478861459181221673b56df;hpb=16204dfc7715783c2ebdfb55fc44fb9344613a76;p=ap-utils.git diff --git a/src/stations.c b/src/stations.c index b37463e..5211f40 100644 --- a/src/stations.c +++ b/src/stations.c @@ -82,7 +82,6 @@ void atmel_stations() mvwaddstr(main_sub, 1, 1, _("Not available (device not in AP mode).")); print_help(ANY_KEY); wrefresh(main_sub); - getch(); goto exit; } @@ -105,7 +104,6 @@ refresh: if (snmp(varbinds, 1, GET) <= 0) { print_helperr(ERR_RET); - getch(); goto exit; } @@ -131,7 +129,6 @@ refresh: if (snmp(varbinds, 1, SET) <= 0) { print_helperr(ERR_RET); - getch(); goto exit; } @@ -159,7 +156,7 @@ refresh: memcpy(curr->ParentMacAddress, ap_410.ParentMacAddress, 6); memcpy(&(curr->IP.s_addr), ap_410.IP, 4); curr->rssi = ap_410.RSSI; - curr->quality = ap_410.LinkQuality; + curr->quality = 100 - (minimum(ap_410.LinkQuality,40))*2,5; curr->Status = ap_410.Status; curr->Port = ap_410.Port; } @@ -219,7 +216,7 @@ refresh: continue; case 'Q': case 'q': - goto exit; + goto quit; case 'T': case 't': if ((ap_type == ATMEL410 && ap_vendorext == SBRIDGES) || @@ -240,6 +237,8 @@ refresh: } exit: + getch(); +quit: while ((curr = first)) { first = curr->next; free(curr); @@ -336,7 +335,8 @@ void nwn_stations() curr = curr->next; } memcpy(curr->addr, varbinds[0].value, 6); - curr->quality = *varbinds[1].value; + curr->quality = 100 - (minimum(*varbinds[1].value,40))*2,5; +// curr->quality = *varbinds[1].value; curr->idle = *varbinds[2].value; curr->rssi = *varbinds[3].value; curr->next = NULL; @@ -414,4 +414,3 @@ void nwn_stations() print_top(NULL, NULL); clear_main(0); } -