summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorLassi Marttala <Lassi.LM.Marttala@partner.bmw.de>2012-07-18 13:14:51 +0200
committerAlexander Wenzel <Alexander.AW.Wenzel@bmw.de>2012-11-26 12:39:04 +0100
commitd3a98020c18bc63f2192a9d93f2196b48d73f1a8 (patch)
tree6670eb92c7dbf15a6fa0d98c59f5dba3dd34f9f6 /src/examples
parent7ed77016669aded1bc30ae4fb7ef063bd290b883 (diff)
downloadDLT-daemon-d3a98020c18bc63f2192a9d93f2196b48d73f1a8.tar.gz
[GDLT-115]: Encapsulate more macros. Fix things that used macros
incorrectly. Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/dlt-example-filetransfer.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/examples/dlt-example-filetransfer.c b/src/examples/dlt-example-filetransfer.c
index 01867de..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];
@@ -197,24 +197,17 @@ int main(int argc, char* argv[])
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