Skip to content

Commit

Permalink
init_fs_db error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdelnero committed Nov 7, 2023
1 parent b6c0eda commit db8c148
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mtp_operations/mtp_op_opensession.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ uint32_t mtp_op_OpenSession(mtp_ctx * ctx,MTP_PACKET_HEADER * mtp_packet_hdr, in
ctx->session_id = id;

ctx->fs_db = init_fs_db(ctx);
if( !ctx->fs_db )
{
PRINT_DEBUG("Open session - init fs db failure");
return MTP_RESPONSE_GENERAL_ERROR;
}

i = 0;
while( (i < MAX_STORAGE_NB) && ctx->storages[i].root_path)
Expand Down

0 comments on commit db8c148

Please sign in to comment.