Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue committed May 6, 2017
1 parent 37abb0b commit 71eeb2b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions trunk/core/judged/judged.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ int _get_jobs_mysql(int * jobs) {
jobs[i++] = atoi(row[0]);
}

if(res!=NULL){
if(res!=NULL&&!executesql("commit")){
mysql_free_result(res); // free the memory
res=NULL;
}
Expand Down Expand Up @@ -436,8 +436,9 @@ int work() {

//sleep_time=sleep_tmp;
/* get the database info */
if (!get_jobs(jobs))
retcnt = 0;
if (!get_jobs(jobs)){
return 0;
}
/* exec the submit */
for (int j = 0; jobs[j] > 0; j++) {
runid = jobs[j];
Expand Down

0 comments on commit 71eeb2b

Please sign in to comment.