@@ -291,14 +291,18 @@ static void move_results_to_core(struct nm_event_execution_properties *evprop) {
291291 }
292292
293293 gettimeofday (& tval_before , NULL );
294- gm_log ( GM_LOG_DEBUG , "move_results_to_core()\n" );
294+ gm_log ( GM_LOG_TRACE3 , "move_results_to_core()\n" );
295+ schedule_event (1 , move_results_to_core , NULL );
295296
296297 /* safely move result list aside */
297298 pthread_mutex_lock (& mod_gm_result_list_mutex );
298299 tmp_list = mod_gm_result_list ;
299300 mod_gm_result_list = NULL ;
300301 pthread_mutex_unlock (& mod_gm_result_list_mutex );
301302
303+ if (tmp_list == NULL )
304+ return ;
305+
302306 /* process result list */
303307 while (tmp_list ) {
304308 cur = tmp_list ;
@@ -316,7 +320,6 @@ static void move_results_to_core(struct nm_event_execution_properties *evprop) {
316320 timersub (& tval_after , & tval_before , & tval_result );
317321
318322 gm_log ( GM_LOG_DEBUG , "move_results_to_core processed %d results in %ld.%06lds\n" , count , (long int )tval_result .tv_sec , (long int )tval_result .tv_usec );
319- schedule_event (1 , move_results_to_core , NULL );
320323}
321324
322325/* add list to gearman result list */
@@ -856,7 +859,12 @@ static int handle_host_check( int event_type, void *data ) {
856859 if (hostdata -> latency < 0 )
857860 hostdata -> latency = 0 ;
858861
859- gm_log (GM_LOG_DEBUG , "received job for queue %s: %s, check_options: %d latency so far: %.3fs\n" , target_queue , hostdata -> host_name , check_options , hostdata -> latency );
862+ gm_log (GM_LOG_DEBUG , "received job for queue %s: %s, check_options: %d latency so far: %.3fs\n" ,
863+ target_queue ,
864+ hostdata -> host_name ,
865+ check_options ,
866+ hostdata -> latency
867+ );
860868
861869 /* as we have to intercept host checks so early
862870 * (we cannot cancel checks otherwise)
@@ -1002,7 +1010,13 @@ static int handle_svc_check( int event_type, void *data ) {
10021010 if (svcdata -> latency < 0 )
10031011 svcdata -> latency = 0 ;
10041012
1005- gm_log (GM_LOG_DEBUG , "received job for queue %s: %s - %s, check_options: %d latency so far: %.3fs\n" , target_queue , svcdata -> host_name , svcdata -> service_description , check_options , svcdata -> latency );
1013+ gm_log (GM_LOG_DEBUG , "received job for queue %s: %s - %s, check_options: %d latency so far: %.3fs\n" ,
1014+ target_queue ,
1015+ svcdata -> host_name ,
1016+ svcdata -> service_description ,
1017+ check_options ,
1018+ svcdata -> latency
1019+ );
10061020
10071021 /* as we have to intercept service checks so early
10081022 * (we cannot cancel checks otherwise)
0 commit comments