[Assigner] cart association modified
This commit is contained in:
parent
91a93b6d6a
commit
cd8812d049
@ -38,8 +38,11 @@ bool insert_cart(uint8_t new_req_battery, linkaddr_t mac_cart_addr)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
cart* c = cart_list;
|
cart* c = cart_list;
|
||||||
while(linkaddr_cmp(&(c->cart_address),&mac_cart_addr) == 0)
|
while(c)
|
||||||
c = c->next;
|
{
|
||||||
|
if(linkaddr_cmp(&(c->cart_address),&mac_cart_addr) == 0)
|
||||||
|
c = c->next;
|
||||||
|
}
|
||||||
if(c)
|
if(c)
|
||||||
printf("Cart already associated!\n");
|
printf("Cart already associated!\n");
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user