Fix makefile, full make now succeeds
authorJennifer Richards <jennifer@painless-security.com>
Mon, 16 Apr 2018 21:50:13 +0000 (17:50 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Mon, 16 Apr 2018 21:50:13 +0000 (17:50 -0400)
Makefile.am
mon/tests/test_mon_req_decode.c
mon/tests/test_mon_resp_encode.c

index 81dc4d2..3ef94dd 100644 (file)
@@ -21,7 +21,8 @@ common_srcs = common/tr_name.c \
        common/tr_idp.c \
        common/tr_filter.c \
        common/tr_gss_names.c \
-       common/tr_socket.c
+       common/tr_socket.c \
+       $(mon_srcs)
 
 tid_srcs = tid/tid_resp.c \
 tid/tid_req.c \
@@ -40,8 +41,6 @@ common/tr_config_internal.c \
 common/tr_mq.c
 
 mon_srcs =                   \
-    mon/mons.c               \
-    mon/monc.c               \
     mon/mon_common.c         \
     mon/mon_req.c            \
     mon/mon_req_encode.c     \
@@ -87,11 +86,12 @@ common/tr_gss.c \
 common/tr_gss_client.c \
 $(tid_srcs) \
 $(trp_srcs) \
-$(mon_srcs) \
-$(common_srcs)
+$(common_srcs) \
+mon/mons.c
 
 tr_trust_router_LDFLAGS = $(AM_LDFLAGS) -levent_pthreads -pthread
 tr_trust_router_LDADD = gsscon/libgsscon.la $(GLIB_LIBS)
+
 tr_trpc_SOURCES =tr/trpc_main.c \
 tr/tr_trp.c \
 common/tr_gss.c \
@@ -108,8 +108,9 @@ common/tr_gss.c \
 common/tr_gss_client.c \
 $(tid_srcs) \
 $(trp_srcs) \
-$(mon_srcs) \
-$(common_srcs)
+$(common_srcs) \
+mon/monc.c
+
 tr_trmon_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
 tr_trmon_LDFLAGS = $(AM_LDFLAGS) -pthread
 
@@ -142,7 +143,6 @@ common/tr_gss.c \
 common/tr_gss_client.c \
 $(tid_srcs) \
 $(trp_srcs) \
-$(mon_srcs) \
 $(common_srcs)
 tid_example_tidc_LDADD = gsscon/libgsscon.la  $(GLIB_LIBS)
 tid_example_tidc_LDFLAGS = $(AM_LDFLAGS) -pthread
index 63570b9..5391857 100644 (file)
@@ -110,7 +110,7 @@ static int run_test(const char *filename, MON_REQ *(generator)())
   req_json_str = read_file(filename);
   assert(req_json_str);
 
-  req = mon_req_decode(NULL, req_json_str);
+  req = mon_req_parse(NULL, req_json_str);
   assert(req);
   assert(equal(req, expected));
 
index b4ecdfe..081ed2d 100644 (file)
@@ -21,7 +21,7 @@ static char *reconfigure(MON_RESP_CODE code, const char *message)
   req = mon_req_new(NULL, MON_CMD_RECONFIGURE);
   assert(req);
 
-  resp = mon_resp_new(NULL, req, code, message, NULL);
+  resp = mon_resp_new(NULL, code, message, NULL);
   assert(resp);
 
   resp_json = mon_resp_encode(resp);
@@ -76,7 +76,7 @@ static char *show_success()
                                mon_opt_type_to_string(OPT_TYPE_SHOW_TID_REQ_COUNT),
                                json_integer(1432)));
 
-  resp = mon_resp_new(NULL, req, MON_RESP_SUCCESS, "success", payload);
+  resp = mon_resp_new(NULL, MON_RESP_SUCCESS, "success", payload);
   assert(resp);
 
   resp_json = mon_resp_encode(resp);