src/dird/snapshot.c
static void update_snapretention(UAContext *ua, char *val, SNAPSHOT_DBR *sr)
{
   char ed1[150];
   POOL_MEM tmp(PM_MESSAGE);
   bool ret;
   if (!duration_to_utime(val, &sr->Retention)) {
      ua->error_msg(_("Invalid retention period specified: %s\n"), val);
      return;
   }

   db_lock(ua->db);
   if (!(ret = db_update_snapshot_record(ua->jcr, ua->db, sr))) {
      pm_strcpy(tmp, db_strerror(ua->db));
   }
   db_unlock(ua->db);

   if (!ret) {
      ua->error_msg("%s", tmp.c_str());

   } else {
      ua->info_msg(_("New retention period is: %s\n"),
         edit_utime(sr->Retention, ed1, sizeof(ed1)));
   }
}
/* This part should be in ua_update.c */
This part should be in ua_update.c
This part should be in ua_update . c
static void update_snapretention(UAContext *ua, char *val, SNAPSHOT_DBR *sr)
{
   char ed1[150];
   POOL_MEM tmp(PM_MESSAGE);
   bool ret;
   if (!duration_to_utime(val, &sr->Retention)) {
      ua->error_msg(_("Invalid retention period specified: %s\n"), val);
      return;
   }
   db_lock(ua->db);
   if (!(ret = db_update_snapshot_record(ua->jcr, ua->db, sr))) {
      pm_strcpy(tmp, db_strerror(ua->db));
   }
   db_unlock(ua->db);
   if (!ret) {
      ua->error_msg("%s", tmp.c_str());
   } else {
      ua->info_msg(_("New retention period is: %s\n"),
         edit_utime(sr->Retention, ed1, sizeof(ed1)));
   }
}
static void update_snapretention ( UAContext * ua , char * val , SNAPSHOT_DBR * sr ) { char ed1 [ 150 ] ; POOL_MEM tmp ( PM_MESSAGE ) ; bool ret ; if ( ! duration_to_utime ( val , & sr -> Retention ) ) { ua -> error_msg ( _ ( " \n " ) , val ) ; return ; } db_lock ( ua -> db ) ; if ( ! ( ret = db_update_snapshot_record ( ua -> jcr , ua -> db , sr ) ) ) { pm_strcpy ( tmp , db_strerror ( ua -> db ) ) ; } db_unlock ( ua -> db ) ; if ( ! ret ) { ua -> error_msg ( " " , tmp . c_str ( ) ) ; } else { ua -> info_msg ( _ ( " \n " ) , edit_utime ( sr -> Retention , ed1 , sizeof ( ed1 ) ) ) ; } }
This part should be in ua_update.c
This part should be in ua_update . c