summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/examples/dlt-example-filetransfer.c27
-rw-r--r--src/system/dlt-system-syslog.c2
-rw-r--r--src/tests/dlt-test-filetransfer.c22
3 files changed, 17 insertions, 34 deletions
diff --git a/src/examples/dlt-example-filetransfer.c b/src/examples/dlt-example-filetransfer.c
index b1d3e1a..4716edc 100644
--- a/src/examples/dlt-example-filetransfer.c
+++ b/src/examples/dlt-example-filetransfer.c
@@ -100,7 +100,7 @@ void usage()
int main(int argc, char* argv[])
{
//char str[MAXSTRLEN];
- int opt, timeout, dltResult;;
+ int opt, timeout;
char apid[DLT_ID_SIZE];
char ctid[DLT_ID_SIZE];
@@ -194,27 +194,20 @@ int main(int argc, char* argv[])
}
//Register the application at the dlt-daemon
- dltResult = DLT_REGISTER_APP(apid,FLTR_APP_DESC);
+ DLT_REGISTER_APP(apid,FLTR_APP_DESC);
//Register the context of the main program at the dlt-daemon
- dltResult = DLT_REGISTER_CONTEXT(fileContext,ctid,FLTR_CONTEXT_DESC);
+ DLT_REGISTER_CONTEXT(fileContext,ctid,FLTR_CONTEXT_DESC);
//More details in corresponding methods
- if( dltResult == 0 ){
- if( iflag )
- {
- dlt_user_log_file_infoAbout(&fileContext,file);
- }
-
- if( dlt_user_log_file_complete(&fileContext,file,dflag,timeout) < 0 )
- {
- printf("File couldn't be transferred. Please check the dlt log messages.\n");
- }
-
- }
- else
+ if( iflag )
{
- printf("Filetransfer didn't start...error with dlt daemon. Please check the daemon.\n");
+ dlt_user_log_file_infoAbout(&fileContext,file);
+ }
+
+ if( dlt_user_log_file_complete(&fileContext,file,dflag,timeout) < 0 )
+ {
+ printf("File couldn't be transferred. Please check the dlt log messages.\n");
}
//Unregister the context in which the file transfer happened from the dlt-daemon
diff --git a/src/system/dlt-system-syslog.c b/src/system/dlt-system-syslog.c
index 2e958f2..b07e6d6 100644
--- a/src/system/dlt-system-syslog.c
+++ b/src/system/dlt-system-syslog.c
@@ -129,7 +129,7 @@ void syslog_thread(void *v_conf)
DLT_STRING("dlt-system-syslog, in thread."));
DltSystemConfiguration *conf = (DltSystemConfiguration *) v_conf;
- DLT_REGISTER_CONTEXT(syslogContext, conf->Syslog.ContextId, "SYSLOG Adapter")
+ DLT_REGISTER_CONTEXT(syslogContext, conf->Syslog.ContextId, "SYSLOG Adapter");
int sock = init_socket(conf->Syslog);
if(sock < 0)
diff --git a/src/tests/dlt-test-filetransfer.c b/src/tests/dlt-test-filetransfer.c
index 2d0b9ef..14b69e4 100644
--- a/src/tests/dlt-test-filetransfer.c
+++ b/src/tests/dlt-test-filetransfer.c
@@ -71,7 +71,7 @@ char *file3_2;
//!Not existing file which will be transferred.
char *file3_3;
//!Just some variables
-int i,countPackages, transferResult, dltResult;
+int i,countPackages, transferResult;
//!Prints the test result
void printTestResultPositiveExpected(const char *function, int result){
@@ -373,23 +373,13 @@ int main(void)
file3_3 = "dlt-test-filetransfer-doesntExist_3";
//Register the application at the dlt-daemon
- dltResult = DLT_REGISTER_APP("FLTR","Test Application filetransfer");
-// if(dltResult < 0){
-// printf("Error: DLT_REIGSTER_APP: FLTR\n");
-// return -1;
-// }
+ DLT_REGISTER_APP("FLTR","Test Application filetransfer");
+
//Register the context of the main program at the dlt-daemon
- dltResult = DLT_REGISTER_CONTEXT(mainContext,"MAIN","Main context for filetransfer test");
-// if(dltResult < 0){
-// printf("Error: DLT_REGISTER_CONTEXT: MAIN\n");
-// return -1;
-// }
+ DLT_REGISTER_CONTEXT(mainContext,"MAIN","Main context for filetransfer test");
+
//Register the context in which the file transfer will be logged at the dlt-daemon
- dltResult = DLT_REGISTER_CONTEXT(fileContext,"FLTR","Test Context for filetransfer");
-// if(dltResult < 0){
-// printf("Error: DLT_REGISTER_CONTEXT:FLTR\n");
-// return -1;
-// }
+ DLT_REGISTER_CONTEXT(fileContext,"FLTR","Test Context for filetransfer");
//More details in corresponding methods
testFile1Run1();