summaryrefslogtreecommitdiff
path: root/omapip
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>1999-09-09 23:53:29 +0000
committerTed Lemon <source@isc.org>1999-09-09 23:53:29 +0000
commite92653f1ec74c9b0d0d00e674e4c55508aaac812 (patch)
tree4b770fb4ca46c95f1003092e2b8e484419d89a6a /omapip
parent110d0522237f98966865e0df853110a6aba1d9a5 (diff)
downloadisc-dhcp-e92653f1ec74c9b0d0d00e674e4c55508aaac812.tar.gz
Bug fixes courtesy of Brian Murrell
Diffstat (limited to 'omapip')
-rw-r--r--omapip/Makefile.dist2
-rw-r--r--omapip/buffer.c8
-rw-r--r--omapip/connection.c2
-rw-r--r--omapip/message.c4
-rw-r--r--omapip/protocol.c24
5 files changed, 25 insertions, 15 deletions
diff --git a/omapip/Makefile.dist b/omapip/Makefile.dist
index 86af6019..e429be64 100644
--- a/omapip/Makefile.dist
+++ b/omapip/Makefile.dist
@@ -32,7 +32,7 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
all: libomapi.a test $(CATMANPAGES)
test: test.o libomapi.a
- $(CC) $(DEBUG) -o test test.o libomapi.a
+ $(CC) $(DEBUG) -o test test.o libomapi.a $(LIBS)
libomapi.a: $(OBJ)
rm -f libomapi.a
diff --git a/omapip/buffer.c b/omapip/buffer.c
index f0c6f287..477a2ce1 100644
--- a/omapip/buffer.c
+++ b/omapip/buffer.c
@@ -171,9 +171,9 @@ isc_result_t omapi_connection_copyin (omapi_object_t *h,
/* Copy some bytes from the input buffer, and advance the input buffer
pointer beyond the bytes copied out. */
-u_int32_t omapi_connection_copyout (unsigned char *buf,
- omapi_object_t *h,
- int size)
+isc_result_t omapi_connection_copyout (unsigned char *buf,
+ omapi_object_t *h,
+ int size)
{
int bytes_remaining;
int bytes_this_copy;
@@ -244,7 +244,7 @@ u_int32_t omapi_connection_copyout (unsigned char *buf,
return ISC_R_SUCCESS;
}
-u_int32_t omapi_connection_writer (omapi_object_t *h)
+isc_result_t omapi_connection_writer (omapi_object_t *h)
{
int bytes_this_write;
int bytes_written;
diff --git a/omapip/connection.c b/omapip/connection.c
index 0f7dd30e..d0890bbe 100644
--- a/omapip/connection.c
+++ b/omapip/connection.c
@@ -74,8 +74,10 @@ isc_result_t omapi_connect (omapi_object_t *c,
} else
he = (struct hostent *)0;
+#if defined (HAVE_SA_LEN)
obj -> remote_addr.sin_len =
sizeof (struct sockaddr_in);
+#endif
obj -> remote_addr.sin_family = AF_INET;
memset (&(obj -> remote_addr.sin_zero), 0,
sizeof obj -> remote_addr.sin_zero);
diff --git a/omapip/message.c b/omapip/message.c
index 94489b67..a9695ac2 100644
--- a/omapip/message.c
+++ b/omapip/message.c
@@ -364,7 +364,7 @@ isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
omapi_message_object_t *message, *m;
omapi_object_t *object = (omapi_object_t *)0;
omapi_value_t *tv = (omapi_value_t *)0;
- int create, update, exclusive;
+ u_int32_t create, update, exclusive;
isc_result_t status, waitstatus;
omapi_object_type_t *type;
@@ -623,7 +623,7 @@ isc_result_t omapi_message_process (omapi_object_t *mo, omapi_object_t *po)
(omapi_object_t *)0,
"result", &tv);
if (status == ISC_R_SUCCESS) {
- status = omapi_get_int_value (&waitstatus,
+ status = omapi_get_int_value ((u_int32_t *)&waitstatus,
tv -> value);
omapi_value_dereference (&tv,
"omapi_message_process");
diff --git a/omapip/protocol.c b/omapip/protocol.c
index 38d77411..a8b8dad7 100644
--- a/omapip/protocol.c
+++ b/omapip/protocol.c
@@ -257,8 +257,10 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
case omapi_protocol_intro_wait:
/* Get protocol version and header size in network
byte order. */
- omapi_connection_get_uint32 (c, &p -> protocol_version);
- omapi_connection_get_uint32 (c, &p -> header_size);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> protocol_version);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> header_size);
/* We currently only support the current protocol version. */
if (p -> protocol_version != OMAPI_PROTOCOL_VERSION) {
@@ -294,14 +296,20 @@ isc_result_t omapi_protocol_signal_handler (omapi_object_t *h,
}
/* Swap in the header... */
- omapi_connection_get_uint32 (c, &p -> message -> authid);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> authid);
/* XXX bind the authenticator here! */
- omapi_connection_get_uint32 (c, &p -> message -> authlen);
- omapi_connection_get_uint32 (c, &p -> message -> op);
- omapi_connection_get_uint32 (c, &p -> message -> handle);
- omapi_connection_get_uint32 (c, &p -> message -> id);
- omapi_connection_get_uint32 (c, &p -> message -> rid);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> authlen);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> op);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> handle);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> id);
+ omapi_connection_get_uint32
+ (c, (u_int32_t *)&p -> message -> rid);
/* If there was any extra header data, skip over it. */
if (p -> header_size > sizeof (omapi_protocol_header_t)) {