Preserved job queue currant index after pushing a job. (#1781)

* Peserved job queue current index after pushing a job.

* Reconciled the heinous offense of using tabs.
This commit is contained in:
Pherring04 2024-09-26 11:40:04 -05:00 committed by GitHub
parent 1a842a6b89
commit c9cec718b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,6 +91,11 @@ int Trick::ScheduledJobQueue::push( JobData * new_job ) {
/* Increment the size of the queue */
list_size++ ;
int new_job_index = (insert_pt - list) / sizeof(JobData**);
if(new_job_index < curr_index) {
curr_index++;
}
return(0) ;