fix qb_timespec_add_ms()
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
7d0c52dfb1
commit
9bd8c740ca
@ -1,31 +0,0 @@
|
||||
From 9df0c323981d8e42e02ef1a215ce2fc6927c057e Mon Sep 17 00:00:00 2001
|
||||
From: Angus Salkeld <asalkeld@redhat.com>
|
||||
Date: Thu, 1 Sep 2011 13:49:48 +1000
|
||||
Subject: [PATCH] LOG: fix the default syslog filter
|
||||
|
||||
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
|
||||
---
|
||||
lib/log.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/log.c b/lib/log.c
|
||||
index d931249..2997eac 100644
|
||||
--- a/lib/log.c
|
||||
+++ b/lib/log.c
|
||||
@@ -627,11 +627,11 @@ qb_log_init(const char *name, int32_t facility, uint8_t priority)
|
||||
snprintf(conf[QB_LOG_BLACKBOX].name, PATH_MAX, "%s-blackbox", name);
|
||||
|
||||
logger_inited = QB_TRUE;
|
||||
+ (void)qb_log_syslog_open(&conf[QB_LOG_SYSLOG]);
|
||||
+ _log_target_state_set(&conf[QB_LOG_SYSLOG], QB_LOG_STATE_ENABLED);
|
||||
(void)qb_log_filter_ctl(QB_LOG_SYSLOG, QB_LOG_FILTER_ADD,
|
||||
QB_LOG_FILTER_FILE, "*", priority);
|
||||
|
||||
- (void)qb_log_syslog_open(&conf[QB_LOG_SYSLOG]);
|
||||
- _log_target_state_set(&conf[QB_LOG_SYSLOG], QB_LOG_STATE_ENABLED);
|
||||
}
|
||||
|
||||
void
|
||||
--
|
||||
1.7.6.1
|
||||
|
31
0001-UTIL-fix-qb_timespec_add_ms.patch
Normal file
31
0001-UTIL-fix-qb_timespec_add_ms.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From ef64fd1186979bae8eee2babb04d9b5b29d3099b Mon Sep 17 00:00:00 2001
|
||||
From: Angus Salkeld <asalkeld@redhat.com>
|
||||
Date: Mon, 9 Jan 2012 10:24:08 +1100
|
||||
Subject: [PATCH] UTIL: fix qb_timespec_add_ms()
|
||||
|
||||
It was overwriting the timespec value instead of
|
||||
add to it.
|
||||
|
||||
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
|
||||
---
|
||||
lib/util.c | 4 ++--
|
||||
1 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/util.c b/lib/util.c
|
||||
index 51c94bb..6b835cc 100644
|
||||
--- a/lib/util.c
|
||||
+++ b/lib/util.c
|
||||
@@ -126,8 +126,8 @@ void
|
||||
qb_timespec_add_ms(struct timespec *ts, int32_t ms)
|
||||
{
|
||||
#ifndef S_SPLINT_S
|
||||
- ts->tv_sec = ms / 1000;
|
||||
- ts->tv_nsec = (ms % 1000) * QB_TIME_NS_IN_MSEC;
|
||||
+ ts->tv_sec += ms / 1000;
|
||||
+ ts->tv_nsec += (ms % 1000) * QB_TIME_NS_IN_MSEC;
|
||||
if (ts->tv_nsec >= 1000000000L) {
|
||||
ts->tv_sec++;
|
||||
ts->tv_nsec = ts->tv_nsec - 1000000000L;
|
||||
--
|
||||
1.7.7.5
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: libqb
|
||||
Version: 0.8.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: An IPC library for high performance servers
|
||||
|
||||
Group: System Environment/Libraries
|
||||
@ -9,6 +9,8 @@ URL: http://www.libqb.org
|
||||
Source0: https://fedorahosted.org/releases/q/u/quarterback/%{name}-%{version}.tar.xz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
Patch1: 0001-UTIL-fix-qb_timespec_add_ms.patch
|
||||
|
||||
BuildRequires: libtool doxygen procps check-devel
|
||||
|
||||
#Requires: <nothing>
|
||||
@ -20,6 +22,8 @@ Initially these are IPC and poll.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static
|
||||
make %{?_smp_mflags}
|
||||
@ -63,6 +67,9 @@ developing applications that use %{name}.
|
||||
%{_mandir}/man3/qb*3*
|
||||
|
||||
%changelog
|
||||
* Tue Jan 10 2012 Angus Salkeld <asalkeld@redhat.com> - 0.8.1-2
|
||||
- fix qb_timespec_add_ms()
|
||||
|
||||
* Thu Jan 5 2012 Angus Salkeld <asalkeld@redhat.com> - 0.8.1-1
|
||||
- Rebased to 0.8.1 (#771914)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user