Ignore:
Timestamp:
11/28/11 15:02:58 (12 years ago)
Author:
mmamonski
Message:

version 1.0.11 - ready to try

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pbs_drmaa/submit.c

    r37 r45  
    145145                const fsd_template_t *pbs_tmpl = self->pbs_job_attributes; 
    146146                unsigned i; 
     147                int tries_left = ((pbsdrmaa_session_t *)self->session)->max_retries_count; 
     148                int sleep_time = 1; 
    147149 
    148150                for( i = 0;  i < PBSDRMAA_N_PBS_ATTRIBUTES;  i++ ) 
     
    173175                                if (pbsself->pbs_conn >= 0 ) 
    174176                                        pbs_disconnect( pbsself->pbs_conn ); 
    175                                 sleep(1); 
     177retry_connect: 
     178                                sleep(sleep_time++); 
    176179                                pbsself->pbs_conn = pbs_connect( pbsself->super.contact ); 
    177                                 if( pbsself->pbs_conn < 0 ) 
    178                                         pbsdrmaa_exc_raise_pbs( "pbs_connect" ); 
     180                                if( pbsself->pbs_conn < 0) 
     181                                        if (tries_left--) 
     182                                                goto retry_connect; 
     183                                        else 
     184                                                pbsdrmaa_exc_raise_pbs( "pbs_connect" ); 
    179185                                else 
    180186                                        goto retry; 
     
    612618                TRY 
    613619                  { 
    614                         for (arg = strtok_r(native_spec_copy, " \t", &ctxt); arg; arg = strtok_r(NULL, " \t",&ctxt) ) { 
     620                        for (arg = strtok_r((char *)native_spec_copy, " \t", &ctxt); arg; arg = strtok_r(NULL, " \t",&ctxt) ) { 
    615621                                if (!opt) 
    616622                                  { 
     
    718724#endif 
    719725                        args_list->destroy(args_list); 
    720                         fsd_free(native_spec_copy); 
     726                        fsd_free((char *)native_spec_copy); 
    721727                 } 
    722728                END_TRY 
Note: See TracChangeset for help on using the changeset viewer.