@@ -49,7 +49,6 @@ static pthread_mutex_t plMutex; /* TODO - we can remove plMutex most likely but
4949static pthread_cond_t reuseThread ;
5050static bool reportThreadExits = false;
5151
52- static pid_t xconfReportPid ;
5352static bool isAbortTriggered = false ;
5453static bool isOnDemandReport = false ;
5554
@@ -378,7 +377,7 @@ static void* CollectAndReportXconf(void* data)
378377 else
379378 {
380379 T2Debug ("Abort upload is not yet set.\n" );
381- ret = sendReportOverHTTP (profile -> t2HTTPDest -> URL , jsonReport , & xconfReportPid );
380+ ret = sendReportOverHTTP (profile -> t2HTTPDest -> URL , jsonReport );
382381 }
383382
384383#ifdef PERSIST_LOG_MON_REF
@@ -395,7 +394,6 @@ static void* CollectAndReportXconf(void* data)
395394 }
396395#endif
397396
398- xconfReportPid = -1 ;
399397 if (ret == T2ERROR_FAILURE )
400398 {
401399 if (profile -> cachedReportList != NULL && Vector_Size (profile -> cachedReportList ) >= MAX_CACHED_REPORTS )
@@ -989,50 +987,3 @@ T2ERROR ProfileXConf_storeMarkerEvent(T2Event *eventInfo)
989987 return T2ERROR_SUCCESS ;
990988}
991989
992-
993- T2ERROR ProfileXConf_terminateReport ()
994- {
995-
996- T2ERROR ret = T2ERROR_FAILURE ;
997-
998- pthread_mutex_lock (& plMutex );
999-
1000- if (!singleProfile )
1001- {
1002- T2Error ("Xconf profile is not set.\n" );
1003-
1004- pthread_mutex_unlock (& plMutex );
1005-
1006- return ret ;
1007- }
1008-
1009- // Check whether any XconfReport is in progress
1010- if (singleProfile -> reportInProgress )
1011- {
1012- isAbortTriggered = true;
1013- // Check if a child pid is still alive
1014- if ((xconfReportPid > 0 ) && !kill (xconfReportPid , 0 ))
1015- {
1016- T2Info ("Report upload in progress, terminating the forked reporting child : %d \n" , xconfReportPid );
1017- if (!kill (xconfReportPid , SIGKILL ))
1018- {
1019- ret = T2ERROR_SUCCESS ;
1020- }
1021- }
1022- else
1023- {
1024- T2Info (" Report upload has net yet started, set the abort flag \n" );
1025- ret = T2ERROR_SUCCESS ;
1026- }
1027- }
1028- else
1029- {
1030- T2Info ("No report generation in progress. No further action required for abort.\n" );
1031- }
1032-
1033- pthread_mutex_unlock (& plMutex );
1034-
1035- return ret ;
1036-
1037- }
1038-
0 commit comments