struct json_object sub_json;
struct json_object connections_json;
int result = 0;
+ char *sess_id_str = NULL;
char *tcon_id_str = NULL;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
if (result < 0) {
goto failure;
}
+ sess_id_str = talloc_asprintf(tmp_ctx, "%u", crec->sess_id);
+ if (sess_id_str == NULL) {
+ goto failure;
+ }
+ result = json_add_string(&sub_json, "session_id", sess_id_str);
+ if (result < 0) {
+ goto failure;
+ }
result = json_add_string(&sub_json, "machine", crec->machine);
if (result < 0) {
goto failure;