diff options
author | Paweł Szewczyk <p.szewczyk@samsung.com> | 2017-08-21 14:49:11 +0200 |
---|---|---|
committer | Paweł Szewczyk <p.szewczyk@samsung.com> | 2017-08-21 15:04:16 +0200 |
commit | 18bbf391a1cb70d7dd99c5788614867607620456 (patch) | |
tree | d20f5f194b6f147fb61b93c4915ca51089745437 | |
parent | d59e49040c0d4618250df18add3a3a12e5d79d3b (diff) | |
download | faultd-accepted/tizen_4.0_unified.tar.gz faultd-accepted/tizen_4.0_unified.tar.bz2 faultd-accepted/tizen_4.0_unified.zip |
Remove reason's OID checking during serializationtizen_4.0.m2_releasetizen_4.0.IoT.p2_releasetizen_4.0.IoT.p1_releasesubmit/tizen_4.0/20170828.110004submit/tizen_4.0/20170828.100004submit/tizen/20170821.133151accepted/tizen/unified/20170822.113016accepted/tizen/4.0/unified/20170829.020549tizen_4.0accepted/tizen_4.0_unified
Serialization function should not care about OIDs, because they depend
on database adapter. Reason's OID being zero does not neccessarily mean
the reason is not valid.
Change-Id: Icd792cf20d08099579735edf1362d16256243b44
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
-rw-r--r-- | src/event_types/action_executed_event.c | 2 | ||||
-rw-r--r-- | src/event_types/decision_made_event.c | 2 | ||||
-rw-r--r-- | src/util/common.h | 8 |
3 files changed, 0 insertions, 12 deletions
diff --git a/src/event_types/action_executed_event.c b/src/event_types/action_executed_event.c index 7a95812..4af8362 100644 --- a/src/event_types/action_executed_event.c +++ b/src/event_types/action_executed_event.c @@ -106,8 +106,6 @@ static void ae_event_serialize(struct faultd_event *ev, struct faultd_object *ou struct action_executed_event *ae_ev = to_action_executed_event(ev); - assert(!FAULTD_OID_IS_ZERO(ae_ev->reason->oid)); - faultd_event_serialize_internal(ev, out); faultd_object_append_oid(out, AE_EV_REASON, &ae_ev->reason->oid); faultd_object_append_string(out, AE_EV_ACTION, ae_ev->action); diff --git a/src/event_types/decision_made_event.c b/src/event_types/decision_made_event.c index d2a3d17..fafce4f 100644 --- a/src/event_types/decision_made_event.c +++ b/src/event_types/decision_made_event.c @@ -99,8 +99,6 @@ static void dm_event_serialize(struct faultd_event *ev, struct faultd_object *ou struct decision_made_event *dm_ev = to_decision_made_event(ev); - assert(!FAULTD_OID_IS_ZERO(dm_ev->reason->oid)); - faultd_event_serialize_internal(ev, out); faultd_object_append_oid(out, DM_EV_REASON, &dm_ev->reason->oid); faultd_object_append_string(out, DM_EV_WHO, dm_ev->who_made); diff --git a/src/util/common.h b/src/util/common.h index 15b1ad2..31a0907 100644 --- a/src/util/common.h +++ b/src/util/common.h @@ -45,10 +45,6 @@ #define ARRAY_SIZE(a) (sizeof(a)/sizeof(*a)) -#define BSON_OID_IS_ZERO(o) (o.ints[0] == 0 && \ - o.ints[1] == 0 && \ - o.ints[2] == 0) - #ifndef offsetof #define offsetof(type, member) __builtin_offsetof(type, member) #endif /* offsetof */ @@ -83,10 +79,6 @@ typedef union { sd_id128_t uuid; } faultd_oid_t; -#define FAULTD_OID_IS_ZERO(o) (o.bson.ints[0] == 0 && \ - o.bson.ints[1] == 0 && \ - o.bson.ints[2] == 0) - struct faultd_object { char *key; int type; |