mirror of https://github.com/zlatinb/muwire
Provision for profiles being sent with messages
parent
1b15941fd7
commit
dd38f77dbb
|
@ -740,6 +740,13 @@ class ConnectionAcceptor {
|
|||
throw new Exception("unrecognized version")
|
||||
int count = Integer.parseInt(headers['Count'])
|
||||
|
||||
if (headers.containsKey("Profile") && Boolean.parseBoolean(headers['Profile'])) {
|
||||
int profileLength = dis.readInt()
|
||||
if (profileLength > Constants.MAX_PROFILE_LENGTH)
|
||||
throw new IOException("Profile too big $profileLength")
|
||||
dis.skipBytes(profileLength) // skip for now
|
||||
}
|
||||
|
||||
dis = new DataInputStream(new GZIPInputStream(dis))
|
||||
count.times {
|
||||
MWMessage m = new MWMessage(dis)
|
||||
|
|
Loading…
Reference in New Issue