summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rwxr-xr-xsrc/shared/dlt_common.c60
1 files changed, 7 insertions, 53 deletions
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c
index f9dee4c..1fa2766 100755
--- a/src/shared/dlt_common.c
+++ b/src/shared/dlt_common.c
@@ -1972,11 +1972,6 @@ void dlt_log_set_level(int level)
logging_level = level;
}
-int get_test_dlt_log_set_level()
-{
- return logging_level;
-}
-
void dlt_log_set_filename(const char *filename)
{
// check nullpointer
@@ -1988,11 +1983,6 @@ void dlt_log_set_filename(const char *filename)
}
-char * get_test_dlt_log_set_filename()
-{
- return logging_filename;
-}
-
void dlt_log_init(int mode)
{
logging_mode = mode;
@@ -2009,11 +1999,6 @@ void dlt_log_init(int mode)
}
}
-int get_test_dlt_log_init()
-{
- return logging_mode;
-}
-
void dlt_log_free(void)
{
if(logging_mode == DLT_LOG_TO_FILE) {
@@ -2021,14 +2006,6 @@ void dlt_log_free(void)
}
}
-int get_test_dlt_log_free()
-{
- if(logging_mode == DLT_LOG_TO_FILE)
- return logging_handle;
- else
- return logging_mode;
-}
-
int dlt_log(int prio, char *s)
{
static const char asSeverity[LOG_DEBUG+2][11] = {"EMERGENCY", "ALERT ", "CRITICAL ", "ERROR ", "WARNING ", "NOTICE ", "INFO ", "DEBUG ", " "};
@@ -2430,16 +2407,6 @@ void dlt_buffer_write_block(DltBuffer *buf,int *write, const unsigned char *data
}
}
-int get_test_dlt_buffer_write_block(DltBuffer *buf, int *write, const unsigned char *data, unsigned int size)
-{
- // Get-Method for gtest. Test dlt_buffer_write_block
- dlt_buffer_write_block(buf, write, data, size);
- if (!write)
- return -1;
- else
- return *write;
-}
-
void dlt_buffer_read_block(DltBuffer *buf,int *read,unsigned char *data,unsigned int size)
{
// catch nullpointer
@@ -2458,25 +2425,15 @@ void dlt_buffer_read_block(DltBuffer *buf,int *read,unsigned char *data,unsigned
}
}
-int get_test_dlt_buffer_read_block(DltBuffer *buf, int *read,unsigned char *data,unsigned int size)
-{
- // Get-Method for gtest. Test dlt_buffer_read_block
- dlt_buffer_read_block(buf, read, data, size);
- if(!read)
- return -1;
- else
- return *read;
-}
-
int dlt_buffer_increase_size(DltBuffer *buf)
{
- DltBufferHead *head,*new_head;
- unsigned char *new_ptr;
-
// catch null pointer
if(!buf)
return -1;
+ DltBufferHead *head,*new_head;
+ unsigned char *new_ptr;
+
/* check size */
if(buf->step_size==0) {
/* cannot increase size */
@@ -2798,6 +2755,10 @@ int dlt_buffer_remove(DltBuffer *buf)
void dlt_buffer_info(DltBuffer *buf)
{
+ // check nullpointer
+ if(!buf)
+ return;
+
char str[256];
snprintf(str,sizeof(str),"Buffer: Available size: %d\n",buf->size);
@@ -2809,13 +2770,6 @@ void dlt_buffer_info(DltBuffer *buf)
}
-int get_test_dlt_buffer_info(DltBuffer *buf)
-{
- // Get-Method for gtest. Test dlt_buffer_info
- dlt_buffer_info(buf);
- return 0;
-}
-
void dlt_buffer_status(DltBuffer *buf)
{
int write, read, count;