Changeset c1c0184 in mainline for uspace/srv/vfs/vfs_register.c


Ignore:
Timestamp:
2010-12-26T17:18:36Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
Children:
d3cce52
Parents:
7907cf9
Message:

Make session management explicit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_register.c

    r7907cf9 rc1c0184  
    111111void vfs_register(ipc_callid_t rid, ipc_call_t *request)
    112112{
     113        int phone;
     114       
    113115        dprintf("Processing VFS_REGISTER request received from %p.\n",
    114116            request->in_phone_hash);
     
    186188                return;
    187189        }
    188         fs_info->phone = IPC_GET_ARG5(call);
     190       
     191        phone = IPC_GET_ARG5(call);
     192        async_session_create(&fs_info->session, phone);
    189193        ipc_answer_0(callid, EOK);
    190194       
     
    200204                list_remove(&fs_info->fs_link);
    201205                fibril_mutex_unlock(&fs_head_lock);
    202                 ipc_hangup(fs_info->phone);
     206                async_session_destroy(&fs_info->session);
     207                ipc_hangup(phone);
    203208                free(fs_info);
    204209                ipc_answer_0(callid, EINVAL);
     
    214219                list_remove(&fs_info->fs_link);
    215220                fibril_mutex_unlock(&fs_head_lock);
    216                 ipc_hangup(fs_info->phone);
     221                async_session_destroy(&fs_info->session);
     222                ipc_hangup(phone);
    217223                free(fs_info);
    218224                ipc_answer_0(callid, EINVAL);
     
    270276                        fibril_mutex_unlock(&fs_head_lock);
    271277                        fibril_mutex_lock(&fs->phone_lock);
    272                         phone = async_transaction_begin(fs->phone);
     278                        phone = async_transaction_begin(&fs->session);
    273279                        fibril_mutex_unlock(&fs->phone_lock);
    274280
     
    296302                        fibril_mutex_unlock(&fs_head_lock);
    297303                        fibril_mutex_lock(&fs->phone_lock);
    298                         async_transaction_end(fs->phone, phone);
     304                        async_transaction_end(&fs->session, phone);
    299305                        fibril_mutex_unlock(&fs->phone_lock);
    300306                        return;
Note: See TracChangeset for help on using the changeset viewer.