Commit 5340978e authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

small tweak of decoder_skip

parent 1279cb03
......@@ -230,7 +230,7 @@ out:
return result;
}
static int decoder_skip(struct labcomm_decoder *d, int len)
static int decoder_skip(struct labcomm_decoder *d, int len, int tag)
{
int i;
printf("skipping %d bytes\n", len);
......@@ -240,7 +240,7 @@ static int decoder_skip(struct labcomm_decoder *d, int len)
return d->reader->error;
}
}
return 0;
return tag;
}
static int decode_pragma(struct labcomm_decoder *d, int len)
{
......@@ -280,7 +280,7 @@ static int decode_pragma(struct labcomm_decoder *d, int len)
internal_labcomm_decoder_free(pd);
result = 0;
} else {
result = decoder_skip(d, psize);
result = decoder_skip(d, psize, LABCOMM_PRAGMA);
}
out:
return result;
......@@ -311,8 +311,9 @@ int labcomm_decoder_decode_one(struct labcomm_decoder *d)
} else if (remote_index == LABCOMM_PRAGMA ){
result = decode_pragma(d, length);
} else if (remote_index < LABCOMM_USER) {
fprintf(stderr, "SKIP %d %d\n", remote_index, length);
result = remote_index;
//fprintf(stderr, "SKIP %d %d\n", remote_index, length);
//result = remote_index;
result = decoder_skip(d, length, remote_index);
} else {
int *local_index;
struct call_handler_context wrap = {
......
Markdown is supported
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