Commit da857edf authored by Goetz.Pfeiffer's avatar Goetz.Pfeiffer
Browse files

Bugfix in send_object


When a client of a lowcal Multiplex Read/Write Variable sends
a request before the post-processing of the previous
request was finished, it may happen that one post-processing
gets lost. This is due to the case that in wbuffer_copy_data()
only the data-bytes were copied to the already enqueued object
in the wbuffer queue but not the return-code from lowcal_get().
Now wbuffer_copy_data() examines the return-code of the last
lowcal_get() and puts the PROT_DO_PP bit in the wbuffer queue
if it is not already there.
parent e762e31c
......@@ -326,8 +326,13 @@ static void wbuffer_copy_and_add(wbuffer_type **wbuffer_list,
#undef WBUFFER_DEBUG
static void wbuffer_copy_data(wbuffer_type *src, wbuffer_type *dest)
static void wbuffer_copy_data(wbuffer_type *src, wbuffer_type *dest,
prot_Return n_p_ret)
{ memcpy(dest->data, src->data, sizeof((dest->data)) );
/* if the new entry in the wbuffer-list requires
post processing, keep this bit */
if (n_p_ret & PROT_DO_PP)
dest->p_ret|= PROT_DO_PP;
}
......@@ -432,7 +437,7 @@ static int send_object(prot_Return n_p_ret,
--> the new_buffer object is already
in the list */
{ /* just copy the data in the data-buffer */
wbuffer_copy_data(&new_buffer, curr);
wbuffer_copy_data(&new_buffer, curr, n_p_ret);
/* do not send new-data directly since it's now placed in the
list and the current element will now be processed */
no_new_data= TRUE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment