Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2012-12-07 10:23:10 +0000
committerHenrik Rentz-Reichert2012-12-07 10:23:10 +0000
commit42624a9ae1a468137ee9d45e47a2434ef00bf874 (patch)
tree2c6fb0ca06adca8959bf2e940b5b439996e9ff5e
parent4d83ce0828b3f7a4e565433da28207e2c5478edc (diff)
downloadorg.eclipse.etrice-42624a9ae1a468137ee9d45e47a2434ef00bf874.tar.gz
org.eclipse.etrice-42624a9ae1a468137ee9d45e47a2434ef00bf874.tar.xz
org.eclipse.etrice-42624a9ae1a468137ee9d45e47a2434ef00bf874.zip
[runtime.c] don't access NULL file handle in MSCLogger
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
index 4596292a7..fa0fc43e1 100644
--- a/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
+++ b/runtime/org.eclipse.etrice.runtime.c/src/common/debugging/etMSCLogger.c
@@ -41,17 +41,25 @@ char* etMSCLogger_getObjectName(void){
}
void etMSCLogger_syncCall(char* sourceName, char* messageName, char* targetName){
- etLogger_fprintf(etMSCLogger_fileHandle, "%s ==> %s %s\n", sourceName, targetName, messageName);
+ if (etMSCLogger_fileHandle != NULL) {
+ etLogger_fprintf(etMSCLogger_fileHandle, "%s ==> %s %s\n", sourceName, targetName, messageName);
+ }
}
void etMSCLogger_syncReturn(char* sourceName, char* targetName){
- etLogger_fprintf(etMSCLogger_fileHandle, "%s <== %s\n", sourceName, targetName);
+ if (etMSCLogger_fileHandle != NULL) {
+ etLogger_fprintf(etMSCLogger_fileHandle, "%s <== %s\n", sourceName, targetName);
+ }
}
void etMSCLogger_asyncOut(char* sourceName, char* messageName, char* targetName){
- etLogger_fprintf(etMSCLogger_fileHandle, "%s >-- %s %s\n", sourceName, targetName, messageName);
+ if (etMSCLogger_fileHandle != NULL) {
+ etLogger_fprintf(etMSCLogger_fileHandle, "%s >-- %s %s\n", sourceName, targetName, messageName);
+ }
}
void etMSCLogger_asyncIn(char* sourceName, char* messageName, char* targetName){
- etLogger_fprintf(etMSCLogger_fileHandle, "%s --> %s %s\n", sourceName, targetName, messageName);
+ if (etMSCLogger_fileHandle != NULL) {
+ etLogger_fprintf(etMSCLogger_fileHandle, "%s --> %s %s\n", sourceName, targetName, messageName);
+ }
}

Back to the top