379
*----------------------------------------------------------------------------
381
* HgfsServerTransportSessionGet --
383
* Increment transport session reference count.
391
*----------------------------------------------------------------------------
395
HgfsServerTransportSessionGet(HgfsTransportSessionInfo *transportSession) // IN: session context
397
ASSERT(transportSession);
398
Atomic_Inc(&transportSession->refCount);
403
*----------------------------------------------------------------------------
405
* HgfsServerTransportSessionPut --
407
* Decrement transport session reference count.
409
* Free session info data if no reference.
417
*----------------------------------------------------------------------------
421
HgfsServerTransportSessionPut(HgfsTransportSessionInfo *transportSession) // IN: transport session context
423
ASSERT(transportSession);
424
if (Atomic_FetchAndDec(&transportSession->refCount) == 1) {
425
DblLnkLst_Links *curr, *next;
427
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
429
DblLnkLst_ForEachSafe(curr, next, &transportSession->sessionArray) {
430
HgfsSessionInfo *session = DblLnkLst_Container(curr, HgfsSessionInfo, links);
431
HgfsServerTransportRemoveSessionFromList(transportSession, session);
432
HgfsServerSessionPut(session);
435
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
371
441
*-----------------------------------------------------------------------------
373
443
* HgfsServerInitHandleCounter --
2854
2924
size_t replyPacketSize;
2855
2925
size_t replySize;
2857
HGFS_ASSERT_INPUT(input);
2927
if (HGFS_ERROR_SUCCESS == status) {
2928
HGFS_ASSERT_INPUT(input);
2859
2933
if (input->v4header) {
2860
2934
HgfsHeader *header;
2861
2935
replySize = sizeof *header + replyPayloadSize;
2862
2936
replyPacketSize = replySize;
2863
2937
header = HSPU_GetReplyPacket(input->packet, &replyPacketSize,
2938
input->transportSession);
2865
2939
packetOut = (char *)header;
2867
2941
ASSERT_DEVEL(header && (replySize <= replyPacketSize));
2868
2942
if (header && (sizeof *header <= replyPacketSize)) {
2943
uint64 replySessionId = HGFS_INVALID_SESSION_ID;
2945
if (NULL != input->session) {
2946
replySessionId = input->session->sessionId;
2869
2948
HgfsPackReplyHeaderV4(status, replyPayloadSize, input->op,
2870
input->session->sessionId, input->id, header);
2949
replySessionId, input->id, header);
2873
2952
HgfsReply *reply;
2894
2973
if (!HgfsPacketSend(input->packet, packetOut, replySize,
2895
input->session, 0)) {
2974
input->transportSession, 0)) {
2896
2975
/* Send failed. Drop the reply. */
2897
2976
LOG(4, ("Error sending reply\n"));
2900
HgfsServerSessionPut(input->session);
2979
if (NULL != input->session) {
2980
HgfsServerSessionPut(input->session);
2982
HgfsServerTransportSessionPut(input->transportSession);
2968
3050
HgfsServerSessionReceive(HgfsPacket *packet, // IN: Hgfs Packet
2969
3051
void *clientData) // IN: session info
2971
HgfsSessionInfo *session = (HgfsSessionInfo *)clientData;
3053
HgfsTransportSessionInfo *transportSession = (HgfsTransportSessionInfo *)clientData;
2972
3054
HgfsInternalStatus status;
2973
3055
HgfsInputParam *input = NULL;
3057
ASSERT(transportSession);
2977
if (session->state == HGFS_SESSION_STATE_CLOSED) {
3059
if (transportSession->state == HGFS_SESSION_STATE_CLOSED) {
2978
3060
LOG(4, ("%s: %d: Received packet after disconnected.\n", __FUNCTION__,
2983
HgfsServerSessionGet(session);
3065
HgfsServerTransportSessionGet(transportSession);
2985
if (!HgfsParseRequest(packet, session, &input, &status)) {
3067
if (!HgfsParseRequest(packet, transportSession, &input, &status)) {
2986
3068
LOG(4, ("%s: %d: Can't generate any response for the guest, just exit.\n ",
2987
3069
__FUNCTION__, __LINE__));
2988
HgfsServerSessionPut(session);
3070
HgfsServerTransportSessionPut(transportSession);
3052
3134
*-----------------------------------------------------------------------------
3136
* HgfsServerTransportGetSessionInfo --
3138
* Scans the list of sessions and return the session with the specified
3142
* A valid pointer to HgfsSessionInfo if there is a session with the
3143
* specified session id. NULL, otherwise.
3148
*-----------------------------------------------------------------------------
3152
HgfsServerTransportGetSessionInfo(HgfsTransportSessionInfo *transportSession, // IN: transport session info
3153
uint64 sessionId) // IN: session id
3155
DblLnkLst_Links *curr;
3156
HgfsSessionInfo *session = NULL;
3158
ASSERT(transportSession);
3160
if (HGFS_INVALID_SESSION_ID == sessionId) {
3164
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
3166
DblLnkLst_ForEach(curr, &transportSession->sessionArray) {
3167
session = DblLnkLst_Container(curr, HgfsSessionInfo, links);
3168
if (session->sessionId == sessionId) {
3169
HgfsServerSessionGet(session);
3175
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
3182
*-----------------------------------------------------------------------------
3184
* HgfsServerTransportRemoveSessionFromList --
3186
* Unlinks the specified session info from the list.
3188
* Note: The caller must acquire the sessionArrayLock in transportSession
3189
* before calling this function.
3197
*-----------------------------------------------------------------------------
3201
HgfsServerTransportRemoveSessionFromList(HgfsTransportSessionInfo *transportSession, // IN: transport session info
3202
HgfsSessionInfo *session) // IN: session info
3204
ASSERT(transportSession);
3207
DblLnkLst_Unlink1(&session->links);
3208
transportSession->numSessions--;
3209
HgfsServerSessionPut(session);
3214
*-----------------------------------------------------------------------------
3216
* HgfsServerTransportAddSessionToList --
3218
* Links the specified session info to the list.
3221
* HGFS_ERROR_SUCCESS if the session is successfully added to the list,
3222
* HGFS_ERROR_TOO_MANY_SESSIONS if maximum number of sessions were already
3223
* added to the list.
3228
*-----------------------------------------------------------------------------
3232
HgfsServerTransportAddSessionToList(HgfsTransportSessionInfo *transportSession, // IN: transport session info
3233
HgfsSessionInfo *session) // IN: session info
3235
HgfsInternalStatus status = HGFS_ERROR_TOO_MANY_SESSIONS;
3237
ASSERT(transportSession);
3240
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
3242
if (transportSession->numSessions == MAX_SESSION_COUNT) {
3246
DblLnkLst_LinkLast(&transportSession->sessionArray, &session->links);
3247
transportSession->numSessions++;
3248
HgfsServerSessionGet(session);
3249
status = HGFS_ERROR_SUCCESS;
3252
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
3258
*-----------------------------------------------------------------------------
3054
3260
* HgfsServerCleanupDeletedFolders --
3056
3262
* This function iterates through all shared folders and removes all
3509
3715
* Initialize a new client session.
3717
* Allocate HgfsTransportSessionInfo and initialize it.
3720
* TRUE on success, FALSE otherwise.
3725
*-----------------------------------------------------------------------------
3729
HgfsServerSessionConnect(void *transportData, // IN: transport session context
3730
HgfsServerChannelCallbacks *channelCbTable, // IN: Channel callbacks
3731
uint32 channelCapabilities, // IN: channel capabilities
3732
void **transportSessionData) // OUT: server session context
3734
HgfsTransportSessionInfo *transportSession;
3736
ASSERT(transportSessionData);
3738
LOG(4, ("%s: initting.\n", __FUNCTION__));
3740
transportSession = Util_SafeCalloc(1, sizeof *transportSession);
3741
transportSession->transportData = transportData;
3742
transportSession->channelCbTable = channelCbTable;
3743
transportSession->maxPacketSize = MAX_SERVER_PACKET_SIZE_V4;
3744
transportSession->type = HGFS_SESSION_TYPE_REGULAR;
3745
transportSession->state = HGFS_SESSION_STATE_OPEN;
3746
transportSession->channelCapabilities = channelCapabilities;
3747
transportSession->numSessions = 0;
3749
transportSession->sessionArrayLock =
3750
MXUser_CreateExclLock("HgfsSessionArrayLock",
3751
RANK_hgfsSessionArrayLock);
3752
if (transportSession->sessionArrayLock == NULL) {
3753
LOG(4, ("%s: Could not create session sync mutex.\n", __FUNCTION__));
3754
free(transportSession);
3758
DblLnkLst_Init(&transportSession->sessionArray);
3760
transportSession->defaultSessionId = HGFS_INVALID_SESSION_ID;
3762
Atomic_Write(&transportSession->refCount, 0);
3764
/* Give our session a reference to hold while we are open. */
3765
HgfsServerTransportSessionGet(transportSession);
3767
*transportSessionData = transportSession;
3773
*-----------------------------------------------------------------------------
3775
* HgfsServerAllocateSession --
3777
* Initialize a new Hgfs session.
3511
3779
* Allocate HgfsSessionInfo and initialize it. Create the nodeArray and
3512
3780
* searchArray for the session.
3520
3788
*-----------------------------------------------------------------------------
3524
HgfsServerSessionConnect(void *transportData, // IN: transport session context
3525
HgfsServerChannelCallbacks *channelCbTable, // IN: Channel callbacks
3526
uint32 channelCapabililies, // IN: channel capabilities
3527
void **sessionData) // OUT: server session context
3792
HgfsServerAllocateSession(HgfsTransportSessionInfo *transportSession, // IN:
3793
uint32 channelCapabilities, // IN:
3794
HgfsSessionInfo **sessionData) // OUT:
3530
HgfsSessionInfo *session = Util_SafeMalloc(sizeof *session);
3532
ASSERT(sessionData);
3534
LOG(4, ("%s: initting.\n", __FUNCTION__));
3797
HgfsSessionInfo *session;
3799
ASSERT(transportSession);
3801
session = Util_SafeCalloc(1, sizeof *session);
3537
3804
* Initialize all our locks first as these can fail.
3561
3826
if (session->searchArrayLock == NULL) {
3562
3827
MXUser_DestroyExclLock(session->fileIOLock);
3563
3828
MXUser_DestroyExclLock(session->nodeArrayLock);
3565
3829
LOG(4, ("%s: Could not create search array sync mutex.\n",
3566
3830
__FUNCTION__));
3571
3835
session->sessionId = HgfsGenerateSessionId();
3836
session->state = HGFS_SESSION_STATE_OPEN;
3837
DblLnkLst_Init(&session->links);
3572
3838
session->maxPacketSize = MAX_SERVER_PACKET_SIZE_V4;
3573
3839
session->activeNotification = FALSE;
3840
session->isInactive = TRUE;
3841
session->transportSession = transportSession;
3842
session->numInvalidationAttempts = 0;
3575
3845
* Initialize the node handling components.
3598
3868
/* Initialize search freelist. */
3599
3869
DblLnkLst_Init(&session->searchFreeList);
3871
Atomic_Write(&session->refCount, 0);
3873
/* Give our session a reference to hold while we are open. */
3874
HgfsServerSessionGet(session);
3601
3876
/* Allocate array of searches and add them to free list. */
3602
3877
session->numSearches = NUM_SEARCHES;
3603
3878
session->searchArray = Util_SafeCalloc(session->numSearches,
3610
3885
&session->searchArray[i].links);
3614
* Initialize the general session stuff.
3617
session->type = HGFS_SESSION_TYPE_REGULAR;
3618
session->state = HGFS_SESSION_STATE_OPEN;
3619
session->transportData = transportData;
3620
session->channelCbTable = channelCbTable;
3621
Atomic_Write(&session->refCount, 0);
3623
3888
/* Get common to all sessions capabiities. */
3624
3889
HgfsServerGetDefaultCapabilities(session->hgfsSessionCapabilities,
3625
3890
&session->numberOfCapabilities);
3627
/* Give our session a reference to hold while we are open. */
3628
HgfsServerSessionGet(session);
3629
*sessionData = session;
3631
if (channelCapabililies & HGFS_CHANNEL_SHARED_MEM) {
3892
if (channelCapabilities & HGFS_CHANNEL_SHARED_MEM) {
3632
3893
HgfsServerSetSessionCapability(HGFS_OP_READ_FAST_V4,
3633
3894
HGFS_REQUEST_SUPPORTED, session);
3634
3895
HgfsServerSetSessionCapability(HGFS_OP_WRITE_FAST_V4,
3659
3922
*-----------------------------------------------------------------------------
3924
* HgfsDisconnectSessionInt --
3926
* Disconnect a client session.
3928
* Mark the session as closed as we are in the process of teardown
3929
* of the session. No more new requests should be processed. We would
3930
* start draining any outstanding pending operations at this point.
3938
*-----------------------------------------------------------------------------
3942
HgfsDisconnectSessionInt(HgfsSessionInfo *session) // IN: session context
3946
ASSERT(session->nodeArray);
3947
ASSERT(session->searchArray);
3948
if (session->activeNotification) {
3949
HgfsNotify_CleanupSession(session);
3955
*-----------------------------------------------------------------------------
3661
3957
* HgfsServerSessionDisconnect --
3663
3959
* Disconnect a client session.
3679
3975
HgfsServerSessionDisconnect(void *clientData) // IN: session context
3681
HgfsSessionInfo *session = (HgfsSessionInfo *)clientData;
3684
ASSERT(session->nodeArray);
3685
ASSERT(session->searchArray);
3686
if (session->activeNotification) {
3687
HgfsNotify_CleanupSession(session);
3977
HgfsTransportSessionInfo *transportSession = (HgfsTransportSessionInfo *)clientData;
3978
DblLnkLst_Links *curr, *next;
3980
ASSERT(transportSession);
3982
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
3984
DblLnkLst_ForEachSafe(curr, next, &transportSession->sessionArray) {
3985
HgfsSessionInfo *session = DblLnkLst_Container(curr, HgfsSessionInfo, links);
3987
HgfsDisconnectSessionInt(session);
3690
session->state = HGFS_SESSION_STATE_CLOSED;
3990
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
3992
transportSession->state = HGFS_SESSION_STATE_CLOSED;
3714
4016
HgfsServerSessionClose(void *clientData) // IN: session context
3716
HgfsSessionInfo *session = (HgfsSessionInfo *)clientData;
3719
ASSERT(session->nodeArray);
3720
ASSERT(session->searchArray);
3722
ASSERT(session->state == HGFS_SESSION_STATE_CLOSED);
4018
HgfsTransportSessionInfo *transportSession = (HgfsTransportSessionInfo *)clientData;
4020
ASSERT(transportSession);
4021
ASSERT(transportSession->state == HGFS_SESSION_STATE_CLOSED);
3724
4023
/* Remove, typically, the last reference, will teardown everything. */
3725
HgfsServerSessionPut(session);
4024
HgfsServerTransportSessionPut(transportSession);
3864
4164
* Side effects:
3865
4165
* Frees the packet buffer.
3867
*----------------------------------------------------------------------------
4167
*---------------------------------------------------------------------------
3871
4171
HgfsServerSessionSendComplete(HgfsPacket *packet, // IN/OUT: Hgfs packet
3872
4172
void *clientData) // IN: session info
3874
HgfsSessionInfo *session = (HgfsSessionInfo *)clientData;
4174
HgfsTransportSessionInfo *transportSession =
4175
(HgfsTransportSessionInfo *)clientData;
3876
4177
if (packet->guestInitiated) {
3877
HSPU_PutMetaPacket(packet, session);
3878
HSPU_PutReplyPacket(packet, session);
3879
HSPU_PutDataPacketBuf(packet, session);
4178
HSPU_PutMetaPacket(packet, transportSession);
4179
HSPU_PutReplyPacket(packet, transportSession);
4180
HSPU_PutDataPacketBuf(packet, transportSession);
3881
4182
free(packet->metaPacket);
3981
4282
HgfsPacketSend(HgfsPacket *packet, // IN/OUT: Hgfs Packet
3982
4283
char *packetOut, // IN: output buffer
3983
4284
size_t packetOutLen, // IN: packet size
3984
HgfsSessionInfo *session, // IN: session info
4285
HgfsTransportSessionInfo *transportSession, // IN: session info
3985
4286
HgfsSendFlags flags) // IN: flags for how to process
3987
4288
Bool result = FALSE;
3988
4289
Bool notificationNeeded = packet->guestInitiated && packet->processedAsync;
3990
4291
ASSERT(packet);
4292
ASSERT(transportSession);
3993
if (session->state == HGFS_SESSION_STATE_OPEN) {
4294
if (transportSession->state == HGFS_SESSION_STATE_OPEN) {
3994
4295
packet->replyPacketSize = packetOutLen;
3995
ASSERT(session->type == HGFS_SESSION_TYPE_REGULAR);
3996
result = session->channelCbTable->send(session->transportData,
4296
ASSERT(transportSession->type == HGFS_SESSION_TYPE_REGULAR);
4297
result = transportSession->channelCbTable->send(transportSession->transportData,
3997
4298
packet, packetOut,
3998
4299
packetOutLen, flags);
4148
4449
HgfsServerSessionInvalidateObjects(void *clientData, // IN:
4149
DblLnkLst_Links *shares) // IN: List of new shares
4151
HgfsSessionInfo *session = (HgfsSessionInfo *)clientData;
4153
HgfsInvalidateSessionObjects(shares, session);
4450
DblLnkLst_Links *shares) // IN: List of new shares
4452
HgfsTransportSessionInfo *transportSession =
4453
(HgfsTransportSessionInfo *)clientData;
4454
DblLnkLst_Links *curr;
4456
ASSERT(transportSession);
4457
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
4459
DblLnkLst_ForEach(curr, &transportSession->sessionArray) {
4460
HgfsSessionInfo *session = DblLnkLst_Container(curr, HgfsSessionInfo, links);
4461
HgfsServerSessionGet(session);
4462
HgfsInvalidateSessionObjects(shares, session);
4463
HgfsServerSessionPut(session);
4466
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
4471
*-----------------------------------------------------------------------------
4473
* HgfsServerSessionInvalidateInactiveSessions --
4475
* Iterates over all sessions and invalidate all inactive session objects.
4477
* Following clock algorithm is used to determine whether the session object
4478
* is inactive or not.
4480
* When this function is called, the HGFS server manager will iterate
4481
* over all the sessions belonging to this manager. Each session is marked
4482
* as inactive. Whenever a message is processed for a session, that
4483
* session is marked as active. When this function is called the next time,
4484
* any sessions that are still inactive will be invalidated.
4486
* Caller guarantees that the sessions won't go away under us, so no locks
4490
* Number of active sessions remaining inside the HGFS server.
4495
*-----------------------------------------------------------------------------
4499
HgfsServerSessionInvalidateInactiveSessions(void *clientData) // IN:
4501
HgfsTransportSessionInfo *transportSession =
4502
(HgfsTransportSessionInfo *)clientData;
4503
uint32 numActiveSessionsLeft = 0;
4504
DblLnkLst_Links shares, *curr, *next;
4506
ASSERT(transportSession);
4507
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
4509
DblLnkLst_Init(&shares);
4511
DblLnkLst_ForEachSafe(curr, next, &transportSession->sessionArray) {
4512
HgfsSessionInfo *session = DblLnkLst_Container(curr, HgfsSessionInfo, links);
4513
HgfsServerSessionGet(session);
4515
session->numInvalidationAttempts++;
4516
numActiveSessionsLeft++;
4519
* Check if the session is inactive. If the session is inactive, then
4520
* invalidate the session objects.
4522
if (session->isInactive) {
4524
if (session->numInvalidationAttempts == MAX_SESSION_INVALIDATION_ATTEMPTS) {
4525
HgfsServerTransportRemoveSessionFromList(transportSession,
4528
* We need to reduce the refcount by 1 since we want to
4529
* destroy the session.
4531
numActiveSessionsLeft--;
4532
HgfsServerSessionPut(session);
4534
HgfsInvalidateSessionObjects(&shares, session);
4537
session->isInactive = TRUE;
4538
session->numInvalidationAttempts = 0;
4541
HgfsServerSessionPut(session);
4544
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
4546
return numActiveSessionsLeft;
5266
5660
sizeof *reply + inlineDataSize, (void **)&reply,
5267
5661
input->session)) {
5268
5662
status = HGFS_ERROR_PROTOCOL;
5663
LOG(4, ("%s: V3/V4 Failed to alloc reply -> PROTOCOL_ERROR.\n", __FUNCTION__));
5270
if (inlineDataSize > 0) {
5271
payload = reply->payload;
5665
if (HGFS_OP_READ_V3 == input->op) {
5666
payload = &reply->payload[0];
5273
5668
payload = HSPU_GetDataPacketBuf(input->packet, BUF_WRITEABLE,
5669
input->transportSession);
5277
5672
status = HgfsPlatformReadFile(file, input->session, offset,
5298
5694
reply->payload, &reply->actualSize);
5299
5695
if (HGFS_ERROR_SUCCESS == status) {
5300
5696
replyPayloadSize = sizeof *reply + reply->actualSize;
5698
LOG(4, ("%s: V1 Failed to read-> %d.\n", __FUNCTION__, status));
5303
5701
status = HGFS_ERROR_PROTOCOL;
5702
LOG(4, ("%s: V1 Failed to alloc reply -> PROTOCOL_ERROR.\n", __FUNCTION__));
5308
5707
NOT_IMPLEMENTED();
5309
5708
status = HGFS_ERROR_PROTOCOL;
5709
LOG(4, ("%s: Unsupported protocol version passed %d -> PROTOCOL_ERROR.\n",
5710
__FUNCTION__, input->op));
7784
8187
if (HgfsUnpackCreateSessionRequest(input->payload, input->payloadSize,
7785
8188
input->op, &info)) {
8189
HgfsSessionInfo *session;
7786
8190
LOG(4, ("%s: create session\n", __FUNCTION__));
7787
if (info.maxPacketSize < input->session->maxPacketSize) {
7788
input->session->maxPacketSize = info.maxPacketSize;
8192
if (!HgfsServerAllocateSession(input->transportSession,
8193
input->transportSession->channelCapabilities,
8195
status = HGFS_ERROR_NOT_ENOUGH_MEMORY;
8198
status = HgfsServerTransportAddSessionToList(input->transportSession,
8200
if (HGFS_ERROR_SUCCESS != status) {
8201
LOG(4, ("%s: Could not add session to the list.\n", __FUNCTION__));
8202
HgfsServerSessionPut(session);
8207
if (info.maxPacketSize < session->maxPacketSize) {
8208
session->maxPacketSize = info.maxPacketSize;
7790
8210
if (HgfsPackCreateSessionReply(input->packet, input->metaPacket,
7791
&replyPayloadSize, input->session)) {
7794
* XXX - TO BE RESTORED on session support implementation
7797
#if defined HGFS_SESSION_SUPPORT
7798
HgfsServerSessionGet(input->session);
8211
&replyPayloadSize, session)) {
7800
8212
status = HGFS_ERROR_SUCCESS;
7802
8214
status = HGFS_ERROR_INTERNAL;
7829
8242
HgfsServerDestroySession(HgfsInputParam *input) // IN: Input params
8244
HgfsTransportSessionInfo *transportSession;
8245
HgfsSessionInfo *session;
7831
8247
HGFS_ASSERT_INPUT(input);
8249
transportSession = input->transportSession;
8250
session = input->session;
8252
session->state = HGFS_SESSION_STATE_CLOSED;
8254
if (session->sessionId == transportSession->defaultSessionId) {
8255
transportSession->defaultSessionId = HGFS_INVALID_SESSION_ID;
8259
* Remove the session from the list. By doing that, the refcount of
8260
* the session will be decremented. Later, we will be invoking
8261
* HgfsServerCompleteRequest which will decrement the session's
8262
* refcount and cleanup the session
8264
MXUser_AcquireExclLock(transportSession->sessionArrayLock);
8265
HgfsServerTransportRemoveSessionFromList(transportSession, session);
8266
MXUser_ReleaseExclLock(transportSession->sessionArrayLock);
7833
8267
HgfsServerCompleteRequest(HGFS_ERROR_SUCCESS, 0, input);
7835
* XXX - TO BE RESTORED on session support implementation
7838
#if defined HGFS_SESSION_SUPPORT
7839
HgfsServerSessionPut(input->session);
8268
HgfsServerSessionPut(session);
7991
8419
HgfsPackChangeNotificationRequest(packetHeader, subscriber, shareName, fileName, mask,
7992
8420
flags, session, &sizeNeeded);
7993
if (!HgfsPacketSend(packet, (char *)packetHeader, sizeNeeded, session, 0)) {
8421
if (!HgfsPacketSend(packet, (char *)packetHeader, sizeNeeded, session->transportSession, 0)) {
7994
8422
LOG(4, ("%s: failed to send notification to the host\n", __FUNCTION__));