summaryrefslogtreecommitdiff
path: root/daemon/gvfsafpconnection.c
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2012-08-09 22:10:02 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2012-08-09 22:12:36 +0200
commitdcb68914ca9464dc41af1e0f0262cd9582b3d4ec (patch)
tree9f1366b958e0834776e66ff721a313c0881de006 /daemon/gvfsafpconnection.c
parent8278677d5b8099b82e496830c71f5e00c166811a (diff)
downloadgvfs-dcb68914ca9464dc41af1e0f0262cd9582b3d4ec.tar.gz
afp: use a separate request id counter for tickle requests
Diffstat (limited to 'daemon/gvfsafpconnection.c')
-rw-r--r--daemon/gvfsafpconnection.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/daemon/gvfsafpconnection.c b/daemon/gvfsafpconnection.c
index f4da0a81..4e059e71 100644
--- a/daemon/gvfsafpconnection.c
+++ b/daemon/gvfsafpconnection.c
@@ -634,6 +634,7 @@ struct _GVfsAfpConnectionPrivate
volatile gint atomic_state;
guint16 request_id;
+ guint16 tickle_id;
guint32 kRequestQuanta;
guint32 kServerReplayCacheSize;
@@ -835,6 +836,14 @@ get_request_id (GVfsAfpConnection *afp_connection)
return priv->request_id++;
}
+static guint16
+get_tickle_id (GVfsAfpConnection *afp_connection)
+{
+ GVfsAfpConnectionPrivate *priv = afp_connection->priv;
+
+ return priv->tickle_id++;
+}
+
typedef struct
{
void *buffer;
@@ -1374,7 +1383,7 @@ send_request_unlocked (GVfsAfpConnection *afp_connection)
case REQUEST_TYPE_TICKLE:
priv->write_dsi_header.flags = 0x00;
priv->write_dsi_header.command = DSI_TICKLE;
- priv->write_dsi_header.requestID = GUINT16_TO_BE (get_request_id (afp_connection));
+ priv->write_dsi_header.requestID = GUINT16_TO_BE (get_tickle_id (afp_connection));
priv->write_dsi_header.writeOffset = 0;
priv->write_dsi_header.totalDataLength = 0;
priv->write_dsi_header.reserved = 0;