Encapsulate flow descriptions inside a struct.

This commit is contained in:
Ian Gulliver
2016-02-29 17:12:06 -08:00
parent 3539f9d640
commit 3fb3c02cf5
12 changed files with 83 additions and 68 deletions

View File

@@ -9,6 +9,7 @@
#include "airspy_adsb.h"
#include "beast.h"
#include "buf.h"
#include "flow.h"
#include "json.h"
#include "packet.h"
#include "peer.h"
@@ -36,6 +37,13 @@ struct receive {
};
static struct receive *receive_head = NULL;
static struct flow _receive_flow = {
.name = "receive",
.new = receive_new,
.ref_count = &peer_count_in,
};
struct flow *receive_flow = &_receive_flow;
static struct parser {
char *name;
parser parse;