Decode the error_path field in TID responses.
[trust_router.git] / common / tr_msg.c
index dbc7938..f8a462c 100644 (file)
@@ -532,7 +532,11 @@ static TID_RESP *tr_msg_decode_tidresp(json_t *jresp)
     if ((NULL != (jerr_msg = json_object_get(jresp, "err_msg"))) ||
        (!json_is_string(jerr_msg))) {
       tresp->err_msg = tr_new_name(json_string_value(jerr_msg));
-    }
+    } else
+      tresp->err_msg = tr_new_name("No error message set.");
+
+    if (NULL !=(tresp->error_path = json_object_get(jresp, "error_path")))
+      json_incref(tresp->error_path);
   }
 
   tresp->rp_realm = tr_new_name(json_string_value(jrp_realm));