Commit 48e93ac4 authored by Matthieu Dorier's avatar Matthieu Dorier

corrected bug related to 0-sized keys and value buffers in list_keyvals

parent 062531fb
......@@ -1274,23 +1274,27 @@ int sdskv_list_keyvals_with_prefix(sdskv_provider_handle_t provider,
}
/* create bulk handle to expose where the keys should be placed */
hret = margo_bulk_create(provider->client->mid,
if(keys) {
hret = margo_bulk_create(provider->client->mid,
*max_keys, keys, ksizes,
HG_BULK_WRITE_ONLY,
&in.keys_bulk_handle);
if(hret != HG_SUCCESS) {
ret = SDSKV_ERR_MERCURY;
goto finish;
if(hret != HG_SUCCESS) {
ret = SDSKV_ERR_MERCURY;
goto finish;
}
}
/* create bulk handle to expose where the keys should be placed */
hret = margo_bulk_create(provider->client->mid,
/* create bulk handle to expose where the values should be placed */
if(values) {
hret = margo_bulk_create(provider->client->mid,
*max_keys, values, vsizes,
HG_BULK_WRITE_ONLY,
&in.vals_bulk_handle);
if(hret != HG_SUCCESS) {
ret = SDSKV_ERR_MERCURY;
goto finish;
if(hret != HG_SUCCESS) {
ret = SDSKV_ERR_MERCURY;
goto finish;
}
}
/* create handle */
......
Markdown is supported
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