summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Nelson2016-11-11 17:19:36 -0600
committerSam Nelson2016-11-11 17:19:36 -0600
commit7284e75d36b265ef8535d2e2ee54d1f2c700e862 (patch)
treed99231a6750d15861d9f16157d55dd2ffaf9ab43
parent6cb4eec0d3c17149e6ed5910a518132b2e6b3322 (diff)
downloadmpm-transport-7284e75d36b265ef8535d2e2ee54d1f2c700e862.tar.gz
mpm-transport-7284e75d36b265ef8535d2e2ee54d1f2c700e862.tar.xz
mpm-transport-7284e75d36b265ef8535d2e2ee54d1f2c700e862.zip
mpm_transport: Debug: Fix issues with reopening of file every openDEV.MPM-TRANSPORT-02.00.02.00A
Signed-off-by: Sam Nelson <sam.nelson@ti.com>
-rwxr-xr-xsrc/transport/mpm_transport.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/transport/mpm_transport.c b/src/transport/mpm_transport.c
index 6f69092..504887e 100755
--- a/src/transport/mpm_transport.c
+++ b/src/transport/mpm_transport.c
@@ -54,7 +54,7 @@
54#endif 54#endif
55 55
56#ifdef LOGFILE_DEBUG 56#ifdef LOGFILE_DEBUG
57FILE * debug_fp; 57FILE *debug_fp=NULL;
58#endif 58#endif
59 59
60void mpm_printf(int val, const char* str, ...) { 60void mpm_printf(int val, const char* str, ...) {
@@ -1098,8 +1098,10 @@ mpm_transport_h mpm_transport_open(char *slave_name, mpm_transport_open_t *cfg)
1098 int ret; 1098 int ret;
1099 1099
1100#ifdef LOGFILE_DEBUG 1100#ifdef LOGFILE_DEBUG
1101 debug_fp = fopen ("/var/log/mpmfilelog", "w+"); 1101 if (!debug_fp) {
1102 mpm_printf(1,"Log file opened ..\n");fflush(debug_fp); 1102 debug_fp = fopen ("/var/log/mpmfilelog", "w+");
1103 mpm_printf(1,"\nLog file opened ..\n");fflush(debug_fp);
1104 }
1103#endif 1105#endif
1104 if (!slave_name || !cfg) { 1106 if (!slave_name || !cfg) {
1105 mpm_printf(1, "Null parameter\n"); 1107 mpm_printf(1, "Null parameter\n");