Update of /cvsroot/dhcp-agent/dhcp-agent/src
In directory sc8-pr-cvs1:/tmp/cvs-serv28614
Modified Files:
dhcp-client-states.c dhcp-com.c dhcp-convert.c
Log Message:
fixes to conversion and parameter list handling
Index: dhcp-client-states.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-client-states.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** dhcp-client-states.c 19 Dec 2002 03:11:45 -0000 1.11
--- dhcp-client-states.c 19 Dec 2002 03:30:15 -0000 1.12
***************
*** 101,107 ****
option = dhcp_build_parameter_request_list_option(client_conf_get_opt_bit_array(dc->conf));
! if(option != NULL)
options = add_to_list(options, option);
!
/* dhcp message type. */
--- 101,108 ----
option = dhcp_build_parameter_request_list_option(client_conf_get_opt_bit_array(dc->conf));
! if(option != NULL) {
! WARN_MESSAGE("sending with empty parameter request list");
options = add_to_list(options, option);
! }
/* dhcp message type. */
Index: dhcp-com.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-com.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dhcp-com.c 16 Dec 2002 07:20:42 -0000 1.5
--- dhcp-com.c 19 Dec 2002 03:30:15 -0000 1.6
***************
*** 527,531 ****
if(len == 0) {
! WARN_MESSAGE("empty parameter list built!");
return NULL;
}
--- 527,531 ----
if(len == 0) {
! /* no parameter list. return empty list. */
return NULL;
}
Index: dhcp-convert.c
===================================================================
RCS file: /cvsroot/dhcp-agent/dhcp-agent/src/dhcp-convert.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** dhcp-convert.c 16 Dec 2002 07:20:42 -0000 1.5
--- dhcp-convert.c 19 Dec 2002 03:30:15 -0000 1.6
***************
*** 227,232 ****
strdup_wrap_net, xfree}
, /* 56 *//* Message */
! {network_uint16_list_to_string, string_to_uint16_list,
! string_uint16_list_to_network, purge_list_internal}
, /* 57 *//* Maximum DHCP message size. */
{network_uint32_to_string, string_to_uint32,
--- 227,232 ----
strdup_wrap_net, xfree}
, /* 56 *//* Message */
! {network_uint16_to_string, string_to_uint16,
! string_uint16_to_network, xfree}
, /* 57 *//* Maximum DHCP message size. */
{network_uint32_to_string, string_to_uint32,
***************
*** 611,615 ****
{
int16_t tmp;
! tmp = ntohl(*(int16_t *)data);
string = int_to_string((void *)&tmp, data_len, size, si);
break;
--- 611,615 ----
{
int16_t tmp;
! tmp = ntohs(*(int16_t *)data);
string = int_to_string((void *)&tmp, data_len, size, si);
break;
***************
*** 638,642 ****
{
uint16_t tmp;
! tmp = ntohl(*(uint16_t *)data);
string = int_to_string((void *)&tmp, data_len, size, si);
break;
--- 638,642 ----
{
uint16_t tmp;
! tmp = ntohs(*(uint16_t *)data);
string = int_to_string((void *)&tmp, data_len, size, si);
break;
|