Skip to content

Commit 792056d

Browse files
committed
Fix issue with multiple clients on WebServer
1 parent dc3102d commit 792056d

File tree

9 files changed

+16356
-16626
lines changed

9 files changed

+16356
-16626
lines changed
Binary file not shown.

hardware/arduino/firmwares/wifishield/wifiHD/Release/wifiHD.hex

Lines changed: 16084 additions & 16328 deletions
Large diffs are not rendered by default.

hardware/arduino/firmwares/wifishield/wifiHD/src/ard_spi.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -538,13 +538,11 @@ int set_passphrase_cmd_cb(int numParam, char* buf, void* ctx) {
538538

539539
int set_ip_config_cmd_cb(int numParam, char* buf, void* ctx) {
540540
struct ip_addr lwip_addr;
541-
uint32_t _ip_addr = 0;
542541
struct ctx_server *hs = ctx;
543542
struct net_cfg *ncfg = &(hs->net_cfg);
544543
struct netif *nif = ncfg->netif;
545544
uint8_t parmsToChange=0;
546545
const uint8_t MAX_IP_CONFIG_PARAMS = 3;
547-
const uint8_t DNS_SERVER_IDX_CHANG = 2;
548546

549547
wl_err_t err = WL_SUCCESS;
550548
tParam* params = (tParam*) buf;
@@ -607,7 +605,6 @@ int set_dns_config_cmd_cb(int numParam, char* buf, void* ctx) {
607605
struct netif *nif = ncfg->netif;
608606
uint8_t parmsToChange=0;
609607
const uint8_t MAX_DNS_CONFIG_PARAMS = 2;
610-
const uint8_t DNS_SERVER_IDX_CHANG = 2;
611608

612609
wl_err_t err = WL_SUCCESS;
613610
tParam* params = (tParam*) buf;
@@ -1787,7 +1784,7 @@ inline int spi_slaveReceiveInt(volatile avr32_spi_t *spi)
17871784
{
17881785
int8_t numParams = 0;
17891786
int idx = PARAM_LEN_POS+1;
1790-
bool islen16bit = _receiveBuffer[CMD_POS] & DATA_FLAG;
1787+
bool islen16bit = ((_receiveBuffer[CMD_POS] & DATA_FLAG) == DATA_FLAG);
17911788
if (index >= idx)
17921789
{
17931790
numParams = _receiveBuffer[PARAM_LEN_POS];
@@ -1804,6 +1801,10 @@ inline int spi_slaveReceiveInt(volatile avr32_spi_t *spi)
18041801
}
18051802
if (!endOfFrame){
18061803
WARN("Wrong termination index:%d nParam:%d idx:%d 16bit:%d\n", index, numParams, idx, islen16bit);
1804+
#ifdef _DEBUG_
1805+
dump((char*)_receiveBuffer, receivedChars);
1806+
while(0);
1807+
#endif
18071808
}
18081809
}
18091810
} while (!endOfFrame);

0 commit comments

Comments
 (0)