Files
pgbackrest/2cd204f.patch
Martin Pluskal b04d05504d Accepting request 677608 from home:bruno_friedmann:branches:server:database:postgresql
- Include upstream patch 2cd204f.patch to fix issue#677 

- Update to 2.10 version bug fixes
  + Add unimplemented S3 driver method required for archive-get.
  + Fix check for improperly configured pg-path. 
- Packaging:
  + Fix trailing space in changes (jengelh)
  + Use a factual description (jengelh)

- Packaging: remove comments/remark fixed and merged issue #659
- Update to 2.08 version : bug fixes and improvement
- Update spec (date and order)
  is ported to C

OBS-URL: https://build.opensuse.org/request/show/677608
OBS-URL: https://build.opensuse.org/package/show/server:database:postgresql/pgbackrest?expand=0&rev=21
2019-02-21 08:59:16 +00:00

62 lines
2.4 KiB
Diff

From 2cd204f38037f1465c84bb4e6b55893204ee8f93 Mon Sep 17 00:00:00 2001
From: Stephen Frost <sfrost@snowman.net>
Date: Tue, 12 Feb 2019 14:59:51 +0200
Subject: [PATCH] Change execRead() to return a size_t.
execRead() should be returning a size_t, not a void. Thankfully, this isn't actually used and therefore shouldn't be an issue, but we should fix it anyway.
Contributed by Stephen Frost.
---
src/common/exec.c | 8 +++++---
src/common/exec.h | 2 +-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/common/exec.c b/src/common/exec.c
index 84b1107ea..31d3dc444 100644
--- a/src/common/exec.c
+++ b/src/common/exec.c
@@ -214,7 +214,7 @@ execCheck(Exec *this)
/***********************************************************************************************************************************
Read from the process
***********************************************************************************************************************************/
-void
+size_t
execRead(Exec *this, Buffer *buffer, bool block)
{
FUNCTION_LOG_BEGIN(logLevelTrace);
@@ -226,9 +226,11 @@ execRead(Exec *this, Buffer *buffer, bool block)
ASSERT(this != NULL);
ASSERT(buffer != NULL);
+ size_t result = 0;
+
TRY_BEGIN()
{
- ioHandleRead(this->ioReadHandle, buffer, block);
+ result = ioHandleRead(this->ioReadHandle, buffer, block);
}
CATCH_ANY()
{
@@ -237,7 +239,7 @@ execRead(Exec *this, Buffer *buffer, bool block)
}
TRY_END();
- FUNCTION_LOG_RETURN_VOID();
+ FUNCTION_LOG_RETURN(SIZE, result);
}
/***********************************************************************************************************************************
diff --git a/src/common/exec.h b/src/common/exec.h
index df7574010..2064c284c 100644
--- a/src/common/exec.h
+++ b/src/common/exec.h
@@ -28,7 +28,7 @@ Exec *execNew(const String *command, const StringList *param, const String *name
Functions
***********************************************************************************************************************************/
void execOpen(Exec *this);
-void execRead(Exec *this, Buffer *buffer, bool block);
+size_t execRead(Exec *this, Buffer *buffer, bool block);
void execWrite(Exec *this, Buffer *buffer);
/***********************************************************************************************************************************