src/stored/label.c
void create_session_label(DCR *dcr, DEV_RECORD *rec, int label)
{
   JCR *jcr = dcr->jcr;
   ser_declare;

   Enter(100);
   rec->VolSessionId   = jcr->VolSessionId;
   rec->VolSessionTime = jcr->VolSessionTime;
   rec->Stream         = jcr->JobId;
   rec->maskedStream   = jcr->JobId;

   rec->data = check_pool_memory_size(rec->data, SER_LENGTH_Session_Label);
   ser_begin(rec->data, SER_LENGTH_Session_Label);
   ser_string(BaculaId);
   ser_uint32(BaculaTapeVersion);

   ser_uint32(jcr->JobId);

   /* Changed in VerNum 11 */
   ser_btime(get_current_btime());
   ser_float64(0);

   ser_string(dcr->pool_name);
   ser_string(dcr->pool_type);
   ser_string(jcr->job_name);         /* base Job name */
   ser_string(jcr->client_name);

   /* Added in VerNum 10 */
   ser_string(jcr->Job);              /* Unique name of this Job */
   ser_string(jcr->fileset_name);
   ser_uint32(jcr->getJobType());
   ser_uint32(jcr->getJobLevel());
   /* Added in VerNum 11 */
   ser_string(jcr->fileset_md5);

   if (label == EOS_LABEL) {
      ser_uint32(jcr->JobFiles);
      ser_uint64(jcr->JobBytes);
      ser_uint32((uint32_t)dcr->StartAddr);       /* Start Block */
      ser_uint32((uint32_t)dcr->EndAddr);         /* End Block */
      ser_uint32((uint32_t)(dcr->StartAddr>>32)); /* Start File */
      ser_uint32((uint32_t)(dcr->EndAddr>>32));   /* End File */
      ser_uint32(jcr->JobErrors);

      /* Added in VerNum 11 */
      ser_uint32(jcr->JobStatus);
   }
   ser_end(rec->data, SER_LENGTH_Session_Label);
   rec->data_len = ser_length(rec->data);
   Leave(100);
}
/*
 * Create session (Job) label
 *  The pool memory must be released by the calling program
 */
Create session (Job) label
The pool memory must be released by the calling program
Create session ( Job ) label The pool memory must be released by the calling program
void create_session_label(DCR *dcr, DEV_RECORD *rec, int label)
{
   JCR *jcr = dcr->jcr;
   ser_declare;
   Enter(100);
   rec->VolSessionId   = jcr->VolSessionId;
   rec->VolSessionTime = jcr->VolSessionTime;
   rec->Stream         = jcr->JobId;
   rec->maskedStream   = jcr->JobId;
   rec->data = check_pool_memory_size(rec->data, SER_LENGTH_Session_Label);
   ser_begin(rec->data, SER_LENGTH_Session_Label);
   ser_string(BaculaId);
   ser_uint32(BaculaTapeVersion);
   ser_uint32(jcr->JobId);
   ser_btime(get_current_btime());
   ser_float64(0);
   ser_string(dcr->pool_name);
   ser_string(dcr->pool_type);
   ser_string(jcr->job_name);         
   ser_string(jcr->client_name);
   ser_string(jcr->Job);              
   ser_string(jcr->fileset_name);
   ser_uint32(jcr->getJobType());
   ser_uint32(jcr->getJobLevel());
   ser_string(jcr->fileset_md5);
   if (label == EOS_LABEL) {
      ser_uint32(jcr->JobFiles);
      ser_uint64(jcr->JobBytes);
      ser_uint32((uint32_t)dcr->StartAddr);       
      ser_uint32((uint32_t)dcr->EndAddr);         
      ser_uint32((uint32_t)(dcr->StartAddr>>32)); 
      ser_uint32((uint32_t)(dcr->EndAddr>>32));   
      ser_uint32(jcr->JobErrors);
      ser_uint32(jcr->JobStatus);
   }
   ser_end(rec->data, SER_LENGTH_Session_Label);
   rec->data_len = ser_length(rec->data);
   Leave(100);
}
void create_session_label ( DCR * dcr , DEV_RECORD * rec , int label ) { JCR * jcr = dcr -> jcr ; ser_declare ; Enter ( 100 ) ; rec -> VolSessionId = jcr -> VolSessionId ; rec -> VolSessionTime = jcr -> VolSessionTime ; rec -> Stream = jcr -> JobId ; rec -> maskedStream = jcr -> JobId ; rec -> data = check_pool_memory_size ( rec -> data , SER_LENGTH_Session_Label ) ; ser_begin ( rec -> data , SER_LENGTH_Session_Label ) ; ser_string ( BaculaId ) ; ser_uint32 ( BaculaTapeVersion ) ; ser_uint32 ( jcr -> JobId ) ; ser_btime ( get_current_btime ( ) ) ; ser_float64 ( 0 ) ; ser_string ( dcr -> pool_name ) ; ser_string ( dcr -> pool_type ) ; ser_string ( jcr -> job_name ) ; ser_string ( jcr -> client_name ) ; ser_string ( jcr -> Job ) ; ser_string ( jcr -> fileset_name ) ; ser_uint32 ( jcr -> getJobType ( ) ) ; ser_uint32 ( jcr -> getJobLevel ( ) ) ; ser_string ( jcr -> fileset_md5 ) ; if ( label == EOS_LABEL ) { ser_uint32 ( jcr -> JobFiles ) ; ser_uint64 ( jcr -> JobBytes ) ; ser_uint32 ( ( uint32_t ) dcr -> StartAddr ) ; ser_uint32 ( ( uint32_t ) dcr -> EndAddr ) ; ser_uint32 ( ( uint32_t ) ( dcr -> StartAddr >> 32 ) ) ; ser_uint32 ( ( uint32_t ) ( dcr -> EndAddr >> 32 ) ) ; ser_uint32 ( jcr -> JobErrors ) ; ser_uint32 ( jcr -> JobStatus ) ; } ser_end ( rec -> data , SER_LENGTH_Session_Label ) ; rec -> data_len = ser_length ( rec -> data ) ; Leave ( 100 ) ; }
Create session (Job) label
  The pool memory must be released by the calling program
Create session ( Job ) label The pool memory must be released by the calling program
/* Changed in VerNum 11 */ /* base Job name */ /* Added in VerNum 10 */ /* Unique name of this Job */ /* Added in VerNum 11 */ /* Start Block */ /* End Block */ /* Start File */ /* End File */ /* Added in VerNum 11 */