Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
skylivex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
astronomy
skylivex
Commits
a088835d
Commit
a088835d
authored
Feb 28, 2013
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Manage the non standard message "IMAGE"
parent
99997d19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
skproto.cpp
plugins/skproto.cpp
+17
-0
No files found.
plugins/skproto.cpp
View file @
a088835d
...
...
@@ -266,8 +266,12 @@ void SkyliveProtocol::readFromNetwork()
while
(
tcpSocket
->
bytesAvailable
())
{
if
(
readidx
>
MAX_PACKETREAD
)
{
std
::
cout
<<
"MAX_PACKETREAD REACHED"
<<
std
::
endl
;
return
;
}
tcpSocket
->
read
(
&
c
,
1
);
//std::cout << "Read Byte: " << c << std::endl;
switch
(
SM_TCPCLIENT
)
{
case
HOME
:
...
...
@@ -306,6 +310,19 @@ void SkyliveProtocol::readFromNetwork()
switch
(
c
)
{
case
PARAM_END
:
/*
* Bad. Bad. BAD! there is a fucking one message,
* the "IMAGE" one, that isn't standard and
* doesn't uriencode the URL of the image.
* So, we need to manage this special case.
*/
if
(
protoMsg
.
params
==
"http"
&&
protoMsg
.
cmd
==
"IMAGE"
)
{
protoMsg
.
params
.
append
(
c
);
break
;
}
// Ok it isn't the "fucking special case"
SM_TCPCLIENT
=
CRC
;
protoMsg
.
computed_crc
-=
static_cast
<
int
>
(
c
);
break
;
...
...
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