Commit 2c9d2217 authored by Sebastien Gougeaud's avatar Sebastien Gougeaud Committed by Thomas Leibovici
Browse files

store: fix family retrieval from Xfer data structure



The retrieval was made without checking the type of the Xfer operation,
which means that the field is not valid if the operation is not a PUT.

Change-Id: I56b05939f4843c934667f2431a0ddd5919db92bb
Signed-off-by: default avatarSebastien Gougeaud <sebastien.gougeaud@cea.fr>
Reviewed-on: https://gerrit.ccc.ocre.cea.fr/gerrit/c/phobos/+/6761


Reviewed-by: Linter
Reviewed-by: default avatarThomas Leibovici <thomas.leibovici@cea.fr>
Tested-by: default avatarJenkins s8open_nr <s8open_nr@ccc.ocre.cea.fr>
parent 86f28ce3
......@@ -225,7 +225,6 @@ static int encoder_communicate(struct pho_encoder *enc,
{
pho_req_t *requests = NULL;
struct pho_comm_data data;
enum rsc_family family;
size_t n_reqs = 0;
size_t i = 0;
int rc;
......@@ -235,8 +234,6 @@ static int encoder_communicate(struct pho_encoder *enc,
pho_error(rc, "Error while communicating with encoder for %s",
enc->xfer->xd_objid);
family = enc->xfer->xd_params.put.family;
/* Dispatch generated requests (even on error, if any) */
for (i = 0; i < n_reqs; i++) {
pho_req_t *req;
......@@ -251,7 +248,7 @@ static int encoder_communicate(struct pho_encoder *enc,
/* req_id is used to route responses to the appropriate encoder */
req->id = enc_id;
if (pho_request_is_write(req))
req->walloc->family = family;
req->walloc->family = enc->xfer->xd_params.put.family;
data = pho_comm_data_init(comm);
if (pho_srl_request_pack(req, &data.buf)) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment