bugfix: fixed wrong place of the err check
@@ -212,10 +212,11 @@ int event_encode_dict(struct odict *od, struct ua *ua, enum ua_event ev,
if (user_data) {
err |= odict_entry_add(od, "userdata", ODICT_STRING,
user_data);
+ }
+
if (err)
goto out;
}
- }
if (str_isset(prm)) {
err = odict_entry_add(od, "param", ODICT_STRING, prm);
