Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelBoerlin authored and arogge committed Aug 5, 2023
1 parent abb26ce commit 2187cba
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions core/src/dird/dird_conf.cc
Expand Up @@ -3084,7 +3084,7 @@ static void StoreRunscript(LEX* lc, ResourceItem* item, int index, int pass)
* %N = New Backup JobId
*/
std::optional<std::string> job_code_callback_director(JobControlRecord* jcr,
const char* param)
const char* param)
{
static const std::string yes = "yes";
static const std::string no = "no";
Expand Down Expand Up @@ -3140,8 +3140,9 @@ std::optional<std::string> job_code_callback_director(JobControlRecord* jcr,
}
break;
case 'N': /* Migration/copy job new jobid */
if (jcr && jcr->dir_impl && jcr->dir_impl->mig_jcr && jcr->dir_impl->mig_jcr->dir_impl
&& jcr->dir_impl->mig_jcr->dir_impl->jr.JobId) {
if (jcr && jcr->dir_impl && jcr->dir_impl->mig_jcr
&& jcr->dir_impl->mig_jcr->dir_impl
&& jcr->dir_impl->mig_jcr->dir_impl->jr.JobId) {
return std::to_string(jcr->dir_impl->mig_jcr->dir_impl->jr.JobId);
} else {
return none;
Expand Down
3 changes: 2 additions & 1 deletion core/src/dird/dird_conf.h
Expand Up @@ -679,7 +679,8 @@ bool print_datatype_schema_json(PoolMem& buffer,
json_t* json_datatype(const int type, ResourceItem items[]);
const char* AuthenticationProtocolTypeToString(uint32_t auth_protocol);
const char* JobLevelToString(int level);
std::optional<std::string> job_code_callback_director(JobControlRecord* jcr, const char*);
std::optional<std::string> job_code_callback_director(JobControlRecord* jcr,
const char*);
const char* GetUsageStringForConsoleConfigureCommand();
void DestroyConfigureUsageString();
bool PopulateDefs();
Expand Down
2 changes: 1 addition & 1 deletion core/src/filed/fileset.cc
Expand Up @@ -55,7 +55,7 @@ namespace filedaemon {
* %m = Modification time (for incremental and differential)
*/
std::optional<std::string> job_code_callback_filed(JobControlRecord* jcr,
const char* param)
const char* param)
{
switch (param[0]) {
case 'D':
Expand Down
4 changes: 2 additions & 2 deletions core/src/filed/fileset.h
@@ -1,7 +1,7 @@
/*
BAREOS® - Backup Archiving REcovery Open Sourced
Copyright (C) 2018-2022 Bareos GmbH & Co. KG
Copyright (C) 2018-2023 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -39,7 +39,7 @@ int AddOptionsFlagsToFileset(JobControlRecord* jcr, const char* item);
void AddFileset(JobControlRecord* jcr, const char* item);
bool TermFileset(JobControlRecord* jcr);
std::optional<std::string> job_code_callback_filed(JobControlRecord* jcr,
const char*);
const char*);

} /* namespace filedaemon */

Expand Down
3 changes: 2 additions & 1 deletion core/src/lib/message.h
Expand Up @@ -42,7 +42,8 @@

class JobControlRecord;

typedef std::optional<std::string> (*job_code_callback_t)(JobControlRecord*, const char*);
typedef std::optional<std::string> (*job_code_callback_t)(JobControlRecord*,
const char*);

void Jmsg(JobControlRecord* jcr, int type, utime_t mtime, const char* fmt, ...);
void Qmsg(JobControlRecord* jcr, int type, utime_t mtime, const char* fmt, ...);
Expand Down

0 comments on commit 2187cba

Please sign in to comment.