Merge pull request #61 from painless-security/jennifer/request_id
authormrw42 <margaret@painless-security.com>
Fri, 4 May 2018 19:00:24 +0000 (15:00 -0400)
committerGitHub <noreply@github.com>
Fri, 4 May 2018 19:00:24 +0000 (15:00 -0400)
Add a 'request_id' to TID requests and responses

1  2 
tid/tids.c

diff --combined tid/tids.c
@@@ -80,6 -80,12 +80,12 @@@ static TID_RESP *tids_create_response(T
        goto cleanup;
      }
    }
+   if (req->request_id) {
+     if (NULL == (resp->request_id = tr_dup_name(req->request_id))) {
+       tr_crit("tids_create_response: Error allocating fields in response.");
+       goto cleanup;
+     }
+   }
  
    success=1;
  
@@@ -399,8 -405,8 +405,8 @@@ int tids_accept(TIDS_INSTANCE *tids, in
    int pipe_fd[2];
    struct tid_process tp = {0};
  
 -  if (0 > (conn = accept(listen, NULL, NULL))) {
 -    perror("Error from TIDS Server accept()");
 +  if (0 > (conn = tr_sock_accept(listen))) {
 +    tr_err("tids_accept: Error accepting connection");
      return 1;
    }