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

cleanup to make tests (excl. lib/c/test) run

parent 9802290a
......@@ -184,9 +184,15 @@ static int decoder_skip(struct labcomm_decoder *d, int len, int tag)
static int decode_type_binding(struct labcomm_decoder *d, int kind)
{
#if 0
int sample_index = labcomm_read_packed32(d->reader);
int typedef_index = labcomm_read_packed32(d->reader);
printf("type_binding: 0x%x -> 0x%x\n", sample_index, typedef_index);
#else
labcomm_read_packed32(d->reader); // sample_index
labcomm_read_packed32(d->reader); // typedef_index
#endif
int result = kind;
return result;
}
......@@ -279,16 +285,6 @@ static int decode_sample_def_or_ref(struct labcomm_decoder *d, int kind)
}
break;
}
case LABCOMM_TYPE_DEF: {
int i;
printf("labcomm_decoder: ignoring TYPE_DEF 0x%x\n", remote_index);
for(i = 0; i < signature.size; i++){
printf("%x ",signature.signature[i]);
}
printf("\n");
result = LABCOMM_SAMPLE_DEF;
break;
}
default:
result = -EINVAL;
}
......
......@@ -125,8 +125,6 @@ int test_decode_one(struct labcomm_decoder *decoder)
for (reader.count = 0 ; reader.count < writer.pos ; reader.count++) {
reader.error = 0;
reader.pos = 0;
labcomm_decoder_decode_one(decoder);
labcomm_decoder_decode_one(decoder);
result = labcomm_decoder_decode_one(decoder);
if (result >= 0 ) {
fprintf(stderr, "Got result from buffer with bogus length (%d)\n",
......
......@@ -38,19 +38,19 @@ public class DecoderChannel implements Decoder {
//System.err.println("Got TypeDef: skipping "+len+" bytes");
int idx = decodePacked32();
String name = decodeString();
System.err.println("Got TypeDef: "+idx+" "+name);
//System.err.println("Got TypeDef: "+idx+" "+name);
int siglen = decodePacked32();
System.err.println("siglen="+siglen);
//System.err.println("siglen="+siglen);
for(int i=0; i<siglen; i++) {
byte b = decodeByte();
System.out.print(b);
System.out.print(" ");
//System.out.print(b);
//System.out.print(" ");
}
System.out.println();
//System.out.println();
}
private void processTypeBinding(int len) throws IOException {
System.err.println("Got TypeBinding: skipping "+len+" bytes");
//System.err.println("Got TypeBinding: skipping "+len+" bytes");
for(int i=0; i<len; i++) {
decodeByte();
}
......
......@@ -78,7 +78,7 @@ public class EncoderChannel implements Encoder {
return type_def_registry.getTag(dispatcher);
} catch (IOException e) {
int index = type_def_registry.add(dispatcher);
System.out.println("registered "+dispatcher.getName());
//System.out.println("registered "+dispatcher.getName());
//
//wrap encoder to get encoded length of signature
ByteArrayOutputStream baos = new ByteArrayOutputStream();
......
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