git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4234 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "TLVDecoder.h"
|
||||
|
||||
int errorCodeDecoder = 0;
|
||||
|
||||
const char *errorCodeStringDecoder[] = {
|
||||
"No error",
|
||||
"Buffer NULL",
|
||||
"Buffer too short",
|
||||
"Unexpected IEI",
|
||||
"Mandatory field not present",
|
||||
"Wrong message type",
|
||||
"EXT value doesn't match",
|
||||
"Protocol not supported",
|
||||
};
|
||||
|
||||
void tlv_decode_perror(void)
|
||||
{
|
||||
if (errorCodeDecoder >= 0)
|
||||
// No error or TLV_DECODE_ERR_OK
|
||||
return;
|
||||
printf("TLV decoder error: (%d, %s)\n", errorCodeDecoder, errorCodeStringDecoder[errorCodeDecoder * -1]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user