Browse Source

Placeholders for api files

master
Con Kolivas 9 years ago
parent
commit
cb2c0577cb
  1. 2
      src/Makefile.am
  2. 1
      src/ckpool.c
  3. 14
      src/ckpool.h
  4. 1
      src/generator.c
  5. 1
      src/stratifier.c

2
src/Makefile.am

@ -10,7 +10,7 @@ libckpool_la_LIBADD = @LIBS@
bin_PROGRAMS = ckpool ckpmsg notifier
ckpool_SOURCES = ckpool.c ckpool.h generator.c generator.h bitcoin.c bitcoin.h \
stratifier.c stratifier.h connector.c connector.h uthash.h \
utlist.h api.c api.h
utlist.h
ckpool_LDADD = libckpool.la @JANSSON_LIBS@
ckpmsg_SOURCES = ckpmsg.c

1
src/ckpool.c

@ -32,7 +32,6 @@
#include "generator.h"
#include "stratifier.h"
#include "connector.h"
#include "api.h"
ckpool_t *global_ckp;

14
src/ckpool.h

@ -324,4 +324,18 @@ bool json_get_bool(bool *store, const json_t *val, const char *res);
bool json_getdel_int(int *store, json_t *val, const char *res);
bool json_getdel_int64(int64_t *store, json_t *val, const char *res);
/* API Placeholders for future API implementation */
typedef struct apimsg apimsg_t;
struct apimsg {
char *buf;
int sockd;
};
static inline void ckpool_api(ckpool_t __maybe_unused *ckp, apimsg_t __maybe_unused *apimsg) {};
static inline json_t *json_encode_errormsg(json_error_t __maybe_unused *err_val) { return NULL; };
static inline json_t *json_errormsg(const char __maybe_unused *fmt, ...) { return NULL; };
static inline void send_api_response(json_t __maybe_unused *val, const int __maybe_unused sockd) {};
#endif /* CKPOOL_H */

1
src/generator.c

@ -21,7 +21,6 @@
#include "bitcoin.h"
#include "uthash.h"
#include "utlist.h"
#include "api.h"
struct notify_instance {
/* Hash table data */

1
src/stratifier.c

@ -27,7 +27,6 @@
#include "stratifier.h"
#include "uthash.h"
#include "utlist.h"
#include "api.h"
#define MIN1 60
#define MIN5 300

Loading…
Cancel
Save