Skip to content

Commit

Permalink
Remove unused alarm functionality
Browse files Browse the repository at this point in the history
Change-Id: Ifa5f8c05bbb59db042d4df5baff956aab0487408
Reviewed-on: http://review.couchbase.org/26928
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>
  • Loading branch information
trondn committed Jun 13, 2013
1 parent a8985c3 commit eb85c8f
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 215 deletions.
10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})

ADD_LIBRARY(conflate SHARED
adhoc_commands.c alarm.c conflate.c kvpair.c logging.c
adhoc_commands.c conflate.c kvpair.c logging.c
persist.c rest.c util.c xmpp.c)

TARGET_LINK_LIBRARIES(conflate curl)

INSTALL (FILES conflate.h alarm.h DESTINATION include/libconflate)
INSTALL (FILES conflate.h DESTINATION include/libconflate)

INSTALL(TARGETS conflate
RUNTIME DESTINATION bin
Expand All @@ -24,11 +24,5 @@ INSTALL(TARGETS conflate
ADD_EXECUTABLE(tests/check_kvpair tests/check_kvpair.c tests/test_common.c)
TARGET_LINK_LIBRARIES(tests/check_kvpair conflate)

ADD_EXECUTABLE(tests/check_alarm tests/check_alarm.c tests/test_common.c)
TARGET_LINK_LIBRARIES(tests/check_alarm conflate)

ADD_CUSTOM_COMMAND(TARGET tests/check_kvpair POST_BUILD COMMAND
tests/check_kvpair)

ADD_CUSTOM_COMMAND(TARGET tests/check_alarm POST_BUILD COMMAND
tests/check_alarm)
11 changes: 2 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
ACLOCAL_AMFLAGS=-I m4
lib_LTLIBRARIES = libconflate.la
pkginclude_HEADERS = conflate.h alarm.h
pkginclude_HEADERS = conflate.h

EXTRA_DIST=LICENSE.txt README.markdown libconflate.pc.in

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libconflate.pc

libconflate_la_SOURCES = adhoc_commands.c \
alarm.c \
alarm.h \
conflate.c \
conflate.h \
conflate_convenience.h \
Expand All @@ -26,15 +24,10 @@ libconflate_la_LIBADD = $(LTLIBCURL)

test: check

TESTS = tests/check_kvpair tests/check_alarm
TESTS = tests/check_kvpair
check_PROGRAMS = $(TESTS)

tests_check_kvpair_SOURCES = tests/check_kvpair.c tests/test_common.c \
$(top_builddir)/conflate.h tests/test_common.h
tests_check_kvpair_DEPENDENCIES = libconflate.la
tests_check_kvpair_LDADD = libconflate.la

tests_check_alarm_SOURCES = tests/check_alarm.c tests/test_common.c \
$(top_builddir)/alarm.h tests/test_common.h
tests_check_alarm_DEPENDENCIES = libconflate.la
tests_check_alarm_LDADD = libconflate.la
64 changes: 0 additions & 64 deletions alarm.c

This file was deleted.

126 changes: 0 additions & 126 deletions alarm.h

This file was deleted.

3 changes: 0 additions & 3 deletions conflate.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include <alarm.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -64,8 +63,6 @@ bool start_conflate(conflate_config_t conf) {
conflate_init_commands();
}

handle->alarms = init_alarmqueue();

handle->conf = dup_conf(conf);

if (pthread_create(&handle->thread, NULL, run_func, handle) == 0) {
Expand Down
3 changes: 0 additions & 3 deletions conflate.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ typedef struct _conflate_handle conflate_handle_t;
* \defgroup kvpairs Simple lisp-style Associative Lists
* \defgroup Logging Logging Facilities
* \defgroup Persistence Long-Term Persistence API
* \defgroup Alarm Alarm Functionality
*/

#include "alarm.h"

/**
* \addtogroup kvpairs
* @{
Expand Down
2 changes: 0 additions & 2 deletions conflate_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ struct _conflate_handle {

conflate_config_t *conf;

alarm_queue_t *alarms;

pthread_t thread;

char *url; /* Current URL for debuggability. */
Expand Down
1 change: 1 addition & 0 deletions logging.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <string.h>
#include <stdarg.h>
#include <stdio.h>

#include "conflate.h"
#include "conflate_internal.h"
Expand Down

0 comments on commit eb85c8f

Please sign in to comment.