Add orig_coi to the reponse, fix bugs with coi-to-apc conversion.
[trust_router.git] / common / tr_msg.c
index 204f9d6..592e145 100644 (file)
@@ -112,6 +112,11 @@ static json_t * tr_msg_encode_tidreq(TID_REQ *req)
 
   jstr = json_string(req->comm->buf);
   json_object_set_new(jreq, "community", jstr);
+  
+  if (req->orig_coi) {
+    jstr = json_string(req->orig_coi->buf);
+    json_object_set_new(jreq, "orig_coi", jstr);
+  }
 
   json_object_set_new(jreq, "dh_info", tr_msg_encode_dh(req->tidc_dh));