Correct a comment
[trust_router.git] / tid / tid_req.c
index 8f68e33..88dd991 100644 (file)
@@ -164,7 +164,7 @@ TR_NAME *tid_req_get_orig_coi(TID_REQ *req)
   return(req->orig_coi);
 }
 
-void tid_req_set_rp_orig_coi(TID_REQ *req, TR_NAME *orig_coi)
+void tid_req_set_orig_coi(TID_REQ *req, TR_NAME *orig_coi)
 {
   req->orig_coi = orig_coi;
 }
@@ -189,11 +189,12 @@ void tid_req_set_cookie(TID_REQ *req, void *cookie)
   req->cookie = cookie;
 }
 
-TID_REQ *tid_dup_req (TALLOC_CTX *mem_ctx, TID_REQ *orig_req) 
+/* struct is allocated in talloc null context */
+TID_REQ *tid_dup_req (TID_REQ *orig_req) 
 {
   TID_REQ *new_req = NULL;
 
-  if (NULL == (new_req = talloc_zero(mem_ctx, TID_REQ))) {
+  if (NULL == (new_req = talloc_zero(NULL, TID_REQ))) {
     tr_crit("tid_dup_req: Can't allocated duplicate request.");
     return NULL;
   }
@@ -219,6 +220,9 @@ TID_REQ *tid_dup_req (TALLOC_CTX *mem_ctx, TID_REQ *orig_req)
 }
 
 
+/* Adds the JSON object ref to req's list of objects to release when the
+ * req is freed.
+ */
 void tid_req_cleanup_json( TID_REQ *req, json_t *ref)
 {
   (void) json_array_append_new(req->json_references, ref);