You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
0913523096
The command option was not being set correctly when a remote was started from a local. It was being set as 'local' rather than the command that the local was running as. Also automatically select the remote protocol id based on whether it is started from a local (use the local protocol id) or from the main process (use 0). These were not live issues but could cause strange behaviors as new features are added that might be hard to diagnose.
43 lines
2.3 KiB
C
43 lines
2.3 KiB
C
/***********************************************************************************************************************************
|
|
Protocol Helper
|
|
***********************************************************************************************************************************/
|
|
#ifndef PROTOCOL_HELPER_H
|
|
#define PROTOCOL_HELPER_H
|
|
|
|
/***********************************************************************************************************************************
|
|
Protocol storage type enum
|
|
***********************************************************************************************************************************/
|
|
typedef enum
|
|
{
|
|
protocolStorageTypeRepo,
|
|
protocolStorageTypePg,
|
|
} ProtocolStorageType;
|
|
|
|
#include "protocol/client.h"
|
|
|
|
/***********************************************************************************************************************************
|
|
Constants
|
|
***********************************************************************************************************************************/
|
|
#define PROTOCOL_SERVICE_LOCAL "local"
|
|
STRING_DECLARE(PROTOCOL_SERVICE_LOCAL_STR);
|
|
#define PROTOCOL_SERVICE_REMOTE "remote"
|
|
STRING_DECLARE(PROTOCOL_SERVICE_REMOTE_STR);
|
|
|
|
/***********************************************************************************************************************************
|
|
Functions
|
|
***********************************************************************************************************************************/
|
|
ProtocolClient *protocolLocalGet(ProtocolStorageType protocolStorageType, unsigned int protocolId);
|
|
ProtocolClient *protocolRemoteGet(ProtocolStorageType protocolStorageType);
|
|
|
|
/***********************************************************************************************************************************
|
|
Getters
|
|
***********************************************************************************************************************************/
|
|
bool repoIsLocal(void);
|
|
|
|
/***********************************************************************************************************************************
|
|
Destructor
|
|
***********************************************************************************************************************************/
|
|
void protocolFree(void);
|
|
|
|
#endif
|