diff --git a/cfg_reload.c b/cfg_reload.c index bcb77d61ade..1a9835136c8 100644 --- a/cfg_reload.c +++ b/cfg_reload.c @@ -274,10 +274,16 @@ static inline void send_cmd_to_all_procs(ipc_rpc_f *rpc) for( i=1 ; iseq_no)<0) - srr_ctx->proc_status[i] = RELOAD_FAILED; - else - srr_ctx->proc_status[i] = RELOAD_SENT; + /* set the status before sending, to avoid any race condition + * with running the callback function */ + srr_ctx->proc_status[i] = RELOAD_SENT; + if (i==process_no) { + /* run line the cmd for the proc itself */ + rpc( process_no, (void*)(long)srr_ctx->seq_no); + } else { + if (ipc_send_rpc( i, rpc, (void*)(long)srr_ctx->seq_no)<0) + srr_ctx->proc_status[i] = RELOAD_FAILED; + } } } }