Use ticks for s.ticks.
This commit is contained in:
parent
e521d25241
commit
35e6053795
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: dhcpc.c,v 1.5 2006/08/27 00:07:15 oliverschmidt Exp $
|
||||
* @(#)$Id: dhcpc.c,v 1.6 2006/09/07 15:57:59 bg- Exp $
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -348,10 +348,10 @@ PT_THREAD(handle_dhcp(process_event_t ev, void *data))
|
||||
|
||||
if((ntohs(s.lease_time[0])*65536ul + ntohs(s.lease_time[1]))*CLOCK_SECOND/2
|
||||
<= MAX_TICKS) {
|
||||
s.ticks = (u16_t)(ntohs(s.lease_time[0])*65536ul
|
||||
+ ntohs(s.lease_time[1]))*CLOCK_SECOND/2;
|
||||
s.ticks = (clock_time_t)((ntohs(s.lease_time[0])*65536ul
|
||||
+ ntohs(s.lease_time[1]))*CLOCK_SECOND/2);
|
||||
} else {
|
||||
s.ticks = (u16_t)MAX_TICKS;
|
||||
s.ticks = MAX_TICKS;
|
||||
}
|
||||
|
||||
etimer_set(&s.etimer, s.ticks);
|
||||
|
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: dhcpc.h,v 1.2 2006/08/09 16:13:39 bg- Exp $
|
||||
* @(#)$Id: dhcpc.h,v 1.3 2006/09/07 15:57:59 bg- Exp $
|
||||
*/
|
||||
#ifndef __DHCPC_H__
|
||||
#define __DHCPC_H__
|
||||
@ -38,7 +38,7 @@ struct dhcpc_state {
|
||||
char state;
|
||||
struct uip_udp_conn *conn;
|
||||
struct etimer etimer;
|
||||
u16_t ticks;
|
||||
clock_time_t ticks;
|
||||
const void *mac_addr;
|
||||
int mac_len;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user