@@ -538,13 +538,11 @@ int set_passphrase_cmd_cb(int numParam, char* buf, void* ctx) {
538
538
539
539
int set_ip_config_cmd_cb (int numParam , char * buf , void * ctx ) {
540
540
struct ip_addr lwip_addr ;
541
- uint32_t _ip_addr = 0 ;
542
541
struct ctx_server * hs = ctx ;
543
542
struct net_cfg * ncfg = & (hs -> net_cfg );
544
543
struct netif * nif = ncfg -> netif ;
545
544
uint8_t parmsToChange = 0 ;
546
545
const uint8_t MAX_IP_CONFIG_PARAMS = 3 ;
547
- const uint8_t DNS_SERVER_IDX_CHANG = 2 ;
548
546
549
547
wl_err_t err = WL_SUCCESS ;
550
548
tParam * params = (tParam * ) buf ;
@@ -607,7 +605,6 @@ int set_dns_config_cmd_cb(int numParam, char* buf, void* ctx) {
607
605
struct netif * nif = ncfg -> netif ;
608
606
uint8_t parmsToChange = 0 ;
609
607
const uint8_t MAX_DNS_CONFIG_PARAMS = 2 ;
610
- const uint8_t DNS_SERVER_IDX_CHANG = 2 ;
611
608
612
609
wl_err_t err = WL_SUCCESS ;
613
610
tParam * params = (tParam * ) buf ;
@@ -1787,7 +1784,7 @@ inline int spi_slaveReceiveInt(volatile avr32_spi_t *spi)
1787
1784
{
1788
1785
int8_t numParams = 0 ;
1789
1786
int idx = PARAM_LEN_POS + 1 ;
1790
- bool islen16bit = _receiveBuffer [CMD_POS ] & DATA_FLAG ;
1787
+ bool islen16bit = (( _receiveBuffer [CMD_POS ] & DATA_FLAG ) == DATA_FLAG ) ;
1791
1788
if (index >= idx )
1792
1789
{
1793
1790
numParams = _receiveBuffer [PARAM_LEN_POS ];
@@ -1804,6 +1801,10 @@ inline int spi_slaveReceiveInt(volatile avr32_spi_t *spi)
1804
1801
}
1805
1802
if (!endOfFrame ){
1806
1803
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
1807
1808
}
1808
1809
}
1809
1810
} while (!endOfFrame );
0 commit comments