summaryrefslogtreecommitdiff
path: root/omapip/buffer.c
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-06-27 00:31:20 +0000
committerTed Lemon <source@isc.org>2001-06-27 00:31:20 +0000
commitd758ad8cac9c00c70cfe4dd459bf7e87c268c579 (patch)
tree85d7e10e40b0e1061a40f45ef0e9f44073346482 /omapip/buffer.c
parent07b958004f4e39f9b222115b1b050044a2434ea1 (diff)
downloadisc-dhcp-d758ad8cac9c00c70cfe4dd459bf7e87c268c579.tar.gz
Merge changes between 3.0rc7 and 3.0rc8pl2.
Diffstat (limited to 'omapip/buffer.c')
-rw-r--r--omapip/buffer.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/omapip/buffer.c b/omapip/buffer.c
index d007a23a..3d01357f 100644
--- a/omapip/buffer.c
+++ b/omapip/buffer.c
@@ -72,7 +72,7 @@ void omapi_buffer_trace_setup ()
static void trace_connection_input_input (trace_type_t *ttype,
unsigned length, char *buf)
{
- unsigned left, ol, cc = 0;
+ unsigned left, taken, cc = 0;
char *s;
int32_t connect_index;
isc_result_t status;
@@ -85,6 +85,7 @@ static void trace_connection_input_input (trace_type_t *ttype,
omapi_connection_object_t, lp) {
if (lp -> index == ntohl (connect_index)) {
omapi_connection_reference (&c, lp, MDL);
+ omapi_connection_dereference (&lp, MDL);
break;
}
} omapi_array_foreach_end (omapi_connections,
@@ -97,27 +98,30 @@ static void trace_connection_input_input (trace_type_t *ttype,
}
s = buf + sizeof connect_index;
- left = length - sizeof connect_index;;
+ left = length - sizeof connect_index;
while (left) {
- ol = left;
+ taken = 0;
status = omapi_connection_reader_trace ((omapi_object_t *)c,
- left, s, &length);
+ left, s, &taken);
if (status != ISC_R_SUCCESS) {
log_error ("trace connection input: %s",
isc_result_totext (status));
break;
}
- if (ol == left) {
+ if (!taken) {
if (cc > 0) {
log_error ("trace connection_input: %s",
"input is not being consumed.");
break;
}
cc++;
- } else
+ } else {
cc = 0;
+ left -= taken;
+ }
}
+ omapi_connection_dereference (&c, MDL);
}
static void trace_connection_input_stop (trace_type_t *ttype) { }