From: Margaret Wasserman Date: Mon, 6 May 2013 14:07:04 +0000 (-0400) Subject: Add orig_coi to the reponse, fix bugs with coi-to-apc conversion. X-Git-Tag: 1.0~32 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=trust_router.git;a=commitdiff_plain;h=f66de26d3fb0bf7ad2c1f1fdc2776f7f5f6a7d56 Add orig_coi to the reponse, fix bugs with coi-to-apc conversion. --- diff --git a/common/tr_msg.c b/common/tr_msg.c index 204f9d6..592e145 100644 --- a/common/tr_msg.c +++ b/common/tr_msg.c @@ -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)); diff --git a/tid/tids.c b/tid/tids.c index 1b50b54..56fe596 100644 --- a/tid/tids.c +++ b/tid/tids.c @@ -235,7 +235,7 @@ int tids_send_response (TIDS_INSTANCE *tids, TID_REQ *req, TID_RESP *resp) /* Never send a second response if we already sent one. */ if (req->resp_sent) - return -1; + return 0; mresp.msg_type = TID_RESPONSE; mresp.tid_resp = resp;