Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
5a7b589b
Commit
5a7b589b
authored
Jul 12, 2017
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxcomp: Trivially fix local variables shadowing variables of same name from higher scope.
parent
93c4cea6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
77 deletions
+77
-77
ClientChannel.cpp
nxcomp/src/ClientChannel.cpp
+26
-26
Loop.cpp
nxcomp/src/Loop.cpp
+3
-3
Proxy.cpp
nxcomp/src/Proxy.cpp
+10
-10
ServerChannel.cpp
nxcomp/src/ServerChannel.cpp
+38
-38
No files found.
nxcomp/src/ClientChannel.cpp
View file @
5a7b589b
...
@@ -697,10 +697,10 @@ int ClientChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -697,10 +697,10 @@ int ClientChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
*
(
clientCache_
->
convertSelectionAtomCache
[
i
]),
9
);
*
(
clientCache_
->
convertSelectionAtomCache
[
i
]),
9
);
nextSrc
+=
4
;
nextSrc
+=
4
;
}
}
unsigned
int
timestamp
=
GetULONG
(
nextSrc
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
nextSrc
,
bigEndian_
);
encodeBuffer
.
encodeValue
(
timestamp
-
encodeBuffer
.
encodeValue
(
_
timestamp
-
clientCache_
->
convertSelectionLastTimestamp
,
32
,
4
);
clientCache_
->
convertSelectionLastTimestamp
,
32
,
4
);
clientCache_
->
convertSelectionLastTimestamp
=
timestamp
;
clientCache_
->
convertSelectionLastTimestamp
=
_
timestamp
;
}
}
break
;
break
;
case
X_CopyArea
:
case
X_CopyArea
:
...
@@ -1372,10 +1372,10 @@ int ClientChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1372,10 +1372,10 @@ int ClientChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
16
,
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
16
,
bigEndian_
),
29
,
clientCache_
->
cursorCache
,
9
);
bigEndian_
),
29
,
clientCache_
->
cursorCache
,
9
);
unsigned
int
timestamp
=
GetULONG
(
inputMessage
+
20
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
inputMessage
+
20
,
bigEndian_
);
encodeBuffer
.
encodeValue
(
timestamp
-
encodeBuffer
.
encodeValue
(
_
timestamp
-
clientCache_
->
grabKeyboardLastTimestamp
,
32
,
4
);
clientCache_
->
grabKeyboardLastTimestamp
,
32
,
4
);
clientCache_
->
grabKeyboardLastTimestamp
=
timestamp
;
clientCache_
->
grabKeyboardLastTimestamp
=
_
timestamp
;
sequenceQueue_
.
push
(
clientSequence_
,
inputOpcode
);
sequenceQueue_
.
push
(
clientSequence_
,
inputOpcode
);
...
@@ -1387,10 +1387,10 @@ int ClientChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1387,10 +1387,10 @@ int ClientChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
1
]);
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
1
]);
encodeBuffer
.
encodeXidValue
(
GetULONG
(
inputMessage
+
4
,
bigEndian_
),
encodeBuffer
.
encodeXidValue
(
GetULONG
(
inputMessage
+
4
,
bigEndian_
),
clientCache_
->
windowCache
);
clientCache_
->
windowCache
);
unsigned
int
timestamp
=
GetULONG
(
inputMessage
+
8
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
inputMessage
+
8
,
bigEndian_
);
encodeBuffer
.
encodeValue
(
timestamp
-
encodeBuffer
.
encodeValue
(
_
timestamp
-
clientCache_
->
grabKeyboardLastTimestamp
,
32
,
4
);
clientCache_
->
grabKeyboardLastTimestamp
,
32
,
4
);
clientCache_
->
grabKeyboardLastTimestamp
=
timestamp
;
clientCache_
->
grabKeyboardLastTimestamp
=
_
timestamp
;
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
12
]);
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
12
]);
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
13
]);
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
13
]);
...
@@ -3607,10 +3607,10 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
...
@@ -3607,10 +3607,10 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
unsigned
char
*
nextDest
=
outputMessage
+
32
;
unsigned
char
*
nextDest
=
outputMessage
+
32
;
for
(;
numExtensions
;
numExtensions
--
)
for
(;
numExtensions
;
numExtensions
--
)
{
{
unsigned
int
length
;
unsigned
int
_
length
;
decodeBuffer
.
decodeValue
(
length
,
8
);
decodeBuffer
.
decodeValue
(
_
length
,
8
);
*
nextDest
++
=
(
unsigned
char
)
length
;
*
nextDest
++
=
(
unsigned
char
)
_
length
;
for
(;
length
;
length
--
)
for
(;
_length
;
_
length
--
)
{
{
decodeBuffer
.
decodeValue
(
value
,
8
);
decodeBuffer
.
decodeValue
(
value
,
8
);
*
nextDest
++
=
value
;
*
nextDest
++
=
value
;
...
@@ -3655,13 +3655,13 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
...
@@ -3655,13 +3655,13 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
unsigned
char
*
nextDest
=
outputMessage
+
32
;
unsigned
char
*
nextDest
=
outputMessage
+
32
;
for
(;
numFonts
;
numFonts
--
)
for
(;
numFonts
;
numFonts
--
)
{
{
unsigned
int
length
;
unsigned
int
_
length
;
decodeBuffer
.
decodeValue
(
length
,
8
);
decodeBuffer
.
decodeValue
(
_
length
,
8
);
*
nextDest
++
=
(
unsigned
char
)
length
;
*
nextDest
++
=
(
unsigned
char
)
_
length
;
// Since ProtoStep7 (#issue 108)
// Since ProtoStep7 (#issue 108)
decodeBuffer
.
decodeTextData
(
nextDest
,
length
);
decodeBuffer
.
decodeTextData
(
nextDest
,
_
length
);
nextDest
+=
length
;
nextDest
+=
_
length
;
}
}
handleSave
(
messageStore
,
outputMessage
,
outputLength
);
handleSave
(
messageStore
,
outputMessage
,
outputLength
);
...
@@ -3904,10 +3904,10 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
...
@@ -3904,10 +3904,10 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
{
{
unsigned
int
index
;
unsigned
int
index
;
decodeBuffer
.
decodeValue
(
index
,
4
);
decodeBuffer
.
decodeValue
(
index
,
4
);
unsigned
int
length
;
unsigned
int
_
length
;
const
unsigned
char
*
data
;
const
unsigned
char
*
data
;
ServerCache
::
queryFontFontCache
.
get
(
index
,
length
,
data
);
ServerCache
::
queryFontFontCache
.
get
(
index
,
_
length
,
data
);
memcpy
(
nextDest
,
data
,
length
);
memcpy
(
nextDest
,
data
,
_
length
);
end
=
1
;
end
=
1
;
}
}
...
@@ -3915,7 +3915,7 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
...
@@ -3915,7 +3915,7 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
if
(
end
==
0
)
if
(
end
==
0
)
{
{
unsigned
char
*
saveDest
=
nextDest
;
unsigned
char
*
saveDest
=
nextDest
;
unsigned
int
length
=
numProperties
*
8
+
numCharInfos
*
12
;
unsigned
int
_
length
=
numProperties
*
8
+
numCharInfos
*
12
;
for
(;
numProperties
;
numProperties
--
)
for
(;
numProperties
;
numProperties
--
)
{
{
decodeBuffer
.
decodeValue
(
value
,
32
,
9
);
decodeBuffer
.
decodeValue
(
value
,
32
,
9
);
...
@@ -3930,7 +3930,7 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
...
@@ -3930,7 +3930,7 @@ int ClientChannel::handleWrite(const unsigned char *message, unsigned int length
nextDest
+=
12
;
nextDest
+=
12
;
}
}
ServerCache
::
queryFontFontCache
.
set
(
length
,
saveDest
);
ServerCache
::
queryFontFontCache
.
set
(
_
length
,
saveDest
);
}
}
handleSave
(
messageStore
,
outputMessage
,
outputLength
);
handleSave
(
messageStore
,
outputMessage
,
outputLength
);
...
@@ -7845,12 +7845,12 @@ void ClientChannel::handleDecodeCharInfo(DecodeBuffer &decodeBuffer, unsigned ch
...
@@ -7845,12 +7845,12 @@ void ClientChannel::handleDecodeCharInfo(DecodeBuffer &decodeBuffer, unsigned ch
for
(
unsigned
int
i
=
1
;
i
<
5
;
i
++
)
for
(
unsigned
int
i
=
1
;
i
<
5
;
i
++
)
{
{
unsigned
int
value
;
unsigned
int
_
value
;
decodeBuffer
.
decodeCachedValue
(
value
,
16
,
decodeBuffer
.
decodeCachedValue
(
_
value
,
16
,
*
serverCache_
->
queryFontCharInfoCache
[
i
],
6
);
*
serverCache_
->
queryFontCharInfoCache
[
i
],
6
);
PutUINT
(
value
,
nextDest
,
bigEndian_
);
PutUINT
(
_
value
,
nextDest
,
bigEndian_
);
nextDest
+=
2
;
nextDest
+=
2
;
}
}
...
...
nxcomp/src/Loop.cpp
View file @
5a7b589b
...
@@ -6687,10 +6687,10 @@ int WaitForRemote(ChannelEndPoint &socketAddress)
...
@@ -6687,10 +6687,10 @@ int WaitForRemote(ChannelEndPoint &socketAddress)
strcpy
(
hostLabel
,
"any host"
);
strcpy
(
hostLabel
,
"any host"
);
}
}
long
bindPort
;
long
_
bindPort
;
if
(
socketAddress
.
getTCPHostAndPort
(
NULL
,
&
bindPort
))
if
(
socketAddress
.
getTCPHostAndPort
(
NULL
,
&
_
bindPort
))
{
{
socketAddress
.
setSpec
(
loopbackBind
?
"localhost"
:
"*"
,
bindPort
);
socketAddress
.
setSpec
(
loopbackBind
?
"localhost"
:
"*"
,
_
bindPort
);
}
}
else
else
{
{
...
...
nxcomp/src/Proxy.cpp
View file @
5a7b589b
...
@@ -1138,9 +1138,9 @@ int Proxy::handleRead()
...
@@ -1138,9 +1138,9 @@ int Proxy::handleRead()
// the failure is detected.
// the failure is detected.
//
//
int
result
=
channels_
[
channelId
]
->
handleWrite
(
message
,
dataLength
);
int
_
result
=
channels_
[
channelId
]
->
handleWrite
(
message
,
dataLength
);
if
(
result
<
0
&&
finish
==
0
)
if
(
_
result
<
0
&&
finish
==
0
)
{
{
#ifdef TEST
#ifdef TEST
*
logofs
<<
"Proxy: Failed to write proxy data to FD#"
*
logofs
<<
"Proxy: Failed to write proxy data to FD#"
...
@@ -5793,14 +5793,14 @@ void Proxy::setSplitTimeout(int channelId)
...
@@ -5793,14 +5793,14 @@ void Proxy::setSplitTimeout(int channelId)
for
(
T_list
::
iterator
j
=
channelList
.
begin
();
for
(
T_list
::
iterator
j
=
channelList
.
begin
();
j
!=
channelList
.
end
();
j
++
)
j
!=
channelList
.
end
();
j
++
)
{
{
int
channelId
=
*
j
;
int
_
channelId
=
*
j
;
if
(
channels_
[
channelId
]
!=
NULL
&&
if
(
channels_
[
_
channelId
]
!=
NULL
&&
channels_
[
channelId
]
->
needSplit
()
==
1
)
channels_
[
_
channelId
]
->
needSplit
()
==
1
)
{
{
#ifdef TEST
#ifdef TEST
*
logofs
<<
"Proxy: SPLIT! Channel for FD#"
*
logofs
<<
"Proxy: SPLIT! Channel for FD#"
<<
getFd
(
channelId
)
<<
" still needs splits.
\n
"
<<
getFd
(
_
channelId
)
<<
" still needs splits.
\n
"
<<
logofs_flush
;
<<
logofs_flush
;
#endif
#endif
...
@@ -5840,14 +5840,14 @@ void Proxy::setMotionTimeout(int channelId)
...
@@ -5840,14 +5840,14 @@ void Proxy::setMotionTimeout(int channelId)
for
(
T_list
::
iterator
j
=
channelList
.
begin
();
for
(
T_list
::
iterator
j
=
channelList
.
begin
();
j
!=
channelList
.
end
();
j
++
)
j
!=
channelList
.
end
();
j
++
)
{
{
int
channelId
=
*
j
;
int
_
channelId
=
*
j
;
if
(
channels_
[
channelId
]
!=
NULL
&&
if
(
channels_
[
_
channelId
]
!=
NULL
&&
channels_
[
channelId
]
->
needMotion
()
==
1
)
channels_
[
_
channelId
]
->
needMotion
()
==
1
)
{
{
#ifdef TEST
#ifdef TEST
*
logofs
<<
"Proxy: SPLIT! Channel for FD#"
*
logofs
<<
"Proxy: SPLIT! Channel for FD#"
<<
getFd
(
channelId
)
<<
" still needs motions.
\n
"
<<
getFd
(
_
channelId
)
<<
" still needs motions.
\n
"
<<
logofs_flush
;
<<
logofs_flush
;
#endif
#endif
...
...
nxcomp/src/ServerChannel.cpp
View file @
5a7b589b
...
@@ -501,13 +501,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -501,13 +501,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
if
(
control
->
LocalDeltaCompression
==
0
)
if
(
control
->
LocalDeltaCompression
==
0
)
{
{
int
result
=
handleFastReadReply
(
encodeBuffer
,
requestOpcode
,
int
_
result
=
handleFastReadReply
(
encodeBuffer
,
requestOpcode
,
inputMessage
,
inputLength
);
inputMessage
,
inputLength
);
if
(
result
<
0
)
if
(
_
result
<
0
)
{
{
return
-
1
;
return
-
1
;
}
}
else
if
(
result
>
0
)
else
if
(
_
result
>
0
)
{
{
continue
;
continue
;
}
}
...
@@ -790,9 +790,9 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -790,9 +790,9 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
for
(;
numExtensions
;
numExtensions
--
)
for
(;
numExtensions
;
numExtensions
--
)
{
{
unsigned
int
length
=
(
unsigned
int
)
(
*
nextSrc
++
);
unsigned
int
_
length
=
(
unsigned
int
)
(
*
nextSrc
++
);
encodeBuffer
.
encodeValue
(
length
,
8
);
encodeBuffer
.
encodeValue
(
_
length
,
8
);
#ifdef HIDE_MIT_SHM_EXTENSION
#ifdef HIDE_MIT_SHM_EXTENSION
...
@@ -913,13 +913,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -913,13 +913,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
const
unsigned
char
*
nextSrc
=
inputMessage
+
32
;
const
unsigned
char
*
nextSrc
=
inputMessage
+
32
;
for
(;
numFonts
;
numFonts
--
)
for
(;
numFonts
;
numFonts
--
)
{
{
unsigned
int
length
=
(
unsigned
int
)
(
*
nextSrc
++
);
unsigned
int
_
length
=
(
unsigned
int
)
(
*
nextSrc
++
);
encodeBuffer
.
encodeValue
(
length
,
8
);
encodeBuffer
.
encodeValue
(
_
length
,
8
);
// Since ProtoStep7 (#issue 108)
// Since ProtoStep7 (#issue 108)
encodeBuffer
.
encodeTextData
(
nextSrc
,
length
);
encodeBuffer
.
encodeTextData
(
nextSrc
,
_
length
);
nextSrc
+=
length
;
nextSrc
+=
_
length
;
}
}
priority_
++
;
priority_
++
;
...
@@ -963,13 +963,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -963,13 +963,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
encodeBuffer
.
encodeBoolValue
(
1
);
encodeBuffer
.
encodeBoolValue
(
1
);
unsigned
int
numColors
=
((
inputLength
-
32
)
>>
3
);
unsigned
int
numColors
=
((
inputLength
-
32
)
>>
3
);
const
unsigned
char
*
nextSrc
=
inputMessage
+
40
;
const
unsigned
char
*
nextSrc
1
=
inputMessage
+
40
;
unsigned
char
*
nextDest
=
(
unsigned
char
*
)
inputMessage
+
38
;
unsigned
char
*
nextDest
=
(
unsigned
char
*
)
inputMessage
+
38
;
for
(
unsigned
int
c
=
1
;
c
<
numColors
;
c
++
)
for
(
unsigned
int
c
=
1
;
c
<
numColors
;
c
++
)
{
{
for
(
unsigned
int
i
=
0
;
i
<
6
;
i
++
)
for
(
unsigned
int
i
=
0
;
i
<
6
;
i
++
)
*
nextDest
++
=
*
nextSrc
++
;
*
nextDest
++
=
*
nextSrc
1
++
;
nextSrc
+=
2
;
nextSrc
1
+=
2
;
}
}
unsigned
int
colorsLength
=
numColors
*
6
;
unsigned
int
colorsLength
=
numColors
*
6
;
if
(
serverCache_
->
queryColorsLastReply
.
compare
(
colorsLength
,
if
(
serverCache_
->
queryColorsLastReply
.
compare
(
colorsLength
,
...
@@ -977,13 +977,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -977,13 +977,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
encodeBuffer
.
encodeBoolValue
(
1
);
encodeBuffer
.
encodeBoolValue
(
1
);
else
else
{
{
const
unsigned
char
*
nextSrc
=
inputMessage
+
32
;
const
unsigned
char
*
nextSrc
2
=
inputMessage
+
32
;
encodeBuffer
.
encodeBoolValue
(
0
);
encodeBuffer
.
encodeBoolValue
(
0
);
encodeBuffer
.
encodeValue
(
numColors
,
16
,
5
);
encodeBuffer
.
encodeValue
(
numColors
,
16
,
5
);
for
(
numColors
*=
3
;
numColors
;
numColors
--
)
for
(
numColors
*=
3
;
numColors
;
numColors
--
)
{
{
encodeBuffer
.
encodeValue
(
GetUINT
(
nextSrc
,
bigEndian_
),
16
);
encodeBuffer
.
encodeValue
(
GetUINT
(
nextSrc
2
,
bigEndian_
),
16
);
nextSrc
+=
2
;
nextSrc
2
+=
2
;
}
}
}
}
...
@@ -1299,13 +1299,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1299,13 +1299,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
if
(
control
->
LocalDeltaCompression
==
0
)
if
(
control
->
LocalDeltaCompression
==
0
)
{
{
int
result
=
handleFastReadReply
(
encodeBuffer
,
requestOpcode
,
int
_
result
=
handleFastReadReply
(
encodeBuffer
,
requestOpcode
,
inputMessage
,
inputLength
);
inputMessage
,
inputLength
);
if
(
result
<
0
)
if
(
_
result
<
0
)
{
{
return
-
1
;
return
-
1
;
}
}
else
if
(
result
>
0
)
else
if
(
_
result
>
0
)
{
{
continue
;
continue
;
}
}
...
@@ -1522,13 +1522,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1522,13 +1522,13 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
if
(
control
->
LocalDeltaCompression
==
0
)
if
(
control
->
LocalDeltaCompression
==
0
)
{
{
int
result
=
handleFastReadEvent
(
encodeBuffer
,
inputOpcode
,
int
_
result
=
handleFastReadEvent
(
encodeBuffer
,
inputOpcode
,
inputMessage
,
inputLength
);
inputMessage
,
inputLength
);
if
(
result
<
0
)
if
(
_
result
<
0
)
{
{
return
-
1
;
return
-
1
;
}
}
else
if
(
result
>
0
)
else
if
(
_
result
>
0
)
{
{
continue
;
continue
;
}
}
...
@@ -1620,10 +1620,10 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1620,10 +1620,10 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
serverCache_
->
buttonCache
);
serverCache_
->
buttonCache
);
else
else
encodeBuffer
.
encodeValue
((
unsigned
int
)
detail
,
8
);
encodeBuffer
.
encodeValue
((
unsigned
int
)
detail
,
8
);
unsigned
int
timestamp
=
GetULONG
(
inputMessage
+
4
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
inputMessage
+
4
,
bigEndian_
);
unsigned
int
timestampDiff
=
unsigned
int
timestampDiff
=
timestamp
-
serverCache_
->
lastTimestamp
;
_
timestamp
-
serverCache_
->
lastTimestamp
;
serverCache_
->
lastTimestamp
=
timestamp
;
serverCache_
->
lastTimestamp
=
_
timestamp
;
encodeBuffer
.
encodeCachedValue
(
timestampDiff
,
32
,
encodeBuffer
.
encodeCachedValue
(
timestampDiff
,
32
,
serverCache_
->
motionNotifyTimestampCache
,
9
);
serverCache_
->
motionNotifyTimestampCache
,
9
);
int
skipRest
=
0
;
int
skipRest
=
0
;
...
@@ -1795,10 +1795,10 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1795,10 +1795,10 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
29
,
serverCache_
->
propertyNotifyWindowCache
,
9
);
29
,
serverCache_
->
propertyNotifyWindowCache
,
9
);
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
8
,
bigEndian_
),
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
8
,
bigEndian_
),
29
,
serverCache_
->
propertyNotifyAtomCache
,
9
);
29
,
serverCache_
->
propertyNotifyAtomCache
,
9
);
unsigned
int
timestamp
=
GetULONG
(
inputMessage
+
12
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
inputMessage
+
12
,
bigEndian_
);
unsigned
int
timestampDiff
=
unsigned
int
timestampDiff
=
timestamp
-
serverCache_
->
lastTimestamp
;
_
timestamp
-
serverCache_
->
lastTimestamp
;
serverCache_
->
lastTimestamp
=
timestamp
;
serverCache_
->
lastTimestamp
=
_
timestamp
;
encodeBuffer
.
encodeValue
(
timestampDiff
,
32
,
9
);
encodeBuffer
.
encodeValue
(
timestampDiff
,
32
,
9
);
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
16
]);
encodeBuffer
.
encodeBoolValue
((
unsigned
int
)
inputMessage
[
16
]);
}
}
...
@@ -1819,9 +1819,9 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1819,9 +1819,9 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
break
;
break
;
case
SelectionClear
:
case
SelectionClear
:
{
{
unsigned
int
timestamp
=
GetULONG
(
inputMessage
+
4
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
inputMessage
+
4
,
bigEndian_
);
unsigned
int
timestampDiff
=
timestamp
-
serverCache_
->
lastTimestamp
;
unsigned
int
timestampDiff
=
_
timestamp
-
serverCache_
->
lastTimestamp
;
serverCache_
->
lastTimestamp
=
timestamp
;
serverCache_
->
lastTimestamp
=
_
timestamp
;
encodeBuffer
.
encodeValue
(
timestampDiff
,
32
,
9
);
encodeBuffer
.
encodeValue
(
timestampDiff
,
32
,
9
);
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
8
,
bigEndian_
),
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
8
,
bigEndian_
),
29
,
serverCache_
->
selectionClearWindowCache
,
9
);
29
,
serverCache_
->
selectionClearWindowCache
,
9
);
...
@@ -1831,9 +1831,9 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
...
@@ -1831,9 +1831,9 @@ int ServerChannel::handleRead(EncodeBuffer &encodeBuffer, const unsigned char *m
break
;
break
;
case
SelectionRequest
:
case
SelectionRequest
:
{
{
unsigned
int
timestamp
=
GetULONG
(
inputMessage
+
4
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
inputMessage
+
4
,
bigEndian_
);
unsigned
int
timestampDiff
=
timestamp
-
serverCache_
->
lastTimestamp
;
unsigned
int
timestampDiff
=
_
timestamp
-
serverCache_
->
lastTimestamp
;
serverCache_
->
lastTimestamp
=
timestamp
;
serverCache_
->
lastTimestamp
=
_
timestamp
;
encodeBuffer
.
encodeValue
(
timestampDiff
,
32
,
9
);
encodeBuffer
.
encodeValue
(
timestampDiff
,
32
,
9
);
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
8
,
bigEndian_
),
encodeBuffer
.
encodeCachedValue
(
GetULONG
(
inputMessage
+
8
,
bigEndian_
),
29
,
serverCache_
->
selectionClearWindowCache
,
9
);
29
,
serverCache_
->
selectionClearWindowCache
,
9
);
...
@@ -5669,9 +5669,9 @@ int ServerChannel::handleMotion(EncodeBuffer &encodeBuffer)
...
@@ -5669,9 +5669,9 @@ int ServerChannel::handleMotion(EncodeBuffer &encodeBuffer)
serverCache_
->
buttonCache
);
serverCache_
->
buttonCache
);
else
else
encodeBuffer
.
encodeValue
((
unsigned
int
)
detail
,
8
);
encodeBuffer
.
encodeValue
((
unsigned
int
)
detail
,
8
);
unsigned
int
timestamp
=
GetULONG
(
buffer
+
4
,
bigEndian_
);
unsigned
int
_
timestamp
=
GetULONG
(
buffer
+
4
,
bigEndian_
);
unsigned
int
timestampDiff
=
timestamp
-
serverCache_
->
lastTimestamp
;
unsigned
int
timestampDiff
=
_
timestamp
-
serverCache_
->
lastTimestamp
;
serverCache_
->
lastTimestamp
=
timestamp
;
serverCache_
->
lastTimestamp
=
_
timestamp
;
encodeBuffer
.
encodeCachedValue
(
timestampDiff
,
32
,
encodeBuffer
.
encodeCachedValue
(
timestampDiff
,
32
,
serverCache_
->
motionNotifyTimestampCache
,
9
);
serverCache_
->
motionNotifyTimestampCache
,
9
);
int
skipRest
=
0
;
int
skipRest
=
0
;
...
@@ -7910,11 +7910,11 @@ void ServerChannel::handleEncodeCharInfo(const unsigned char *nextSrc, EncodeBuf
...
@@ -7910,11 +7910,11 @@ void ServerChannel::handleEncodeCharInfo(const unsigned char *nextSrc, EncodeBuf
for
(
unsigned
int
i
=
1
;
i
<
5
;
i
++
)
for
(
unsigned
int
i
=
1
;
i
<
5
;
i
++
)
{
{
unsigned
int
value
=
GetUINT
(
nextSrc
,
bigEndian_
);
unsigned
int
_
value
=
GetUINT
(
nextSrc
,
bigEndian_
);
nextSrc
+=
2
;
nextSrc
+=
2
;
encodeBuffer
.
encodeCachedValue
(
value
,
16
,
encodeBuffer
.
encodeCachedValue
(
_
value
,
16
,
*
serverCache_
->
queryFontCharInfoCache
[
i
],
6
);
*
serverCache_
->
queryFontCharInfoCache
[
i
],
6
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment