1
0
Fork 0
mirror of git://git.psyc.eu/libpsyc synced 2024-08-15 03:19:02 +00:00

added support for binary packets, untested

This commit is contained in:
Marenz 2010-02-20 22:09:04 +01:00
parent 2ee09a0179
commit 6f0dce0867

View file

@ -302,6 +302,11 @@ inline int PSYC_parseElement(
}else
{
*value=data+*cursor+1;
if(1== complete) // we know the length of the packet
{
*vlength= dlength - *cursor -3;
}else
{
*vlength=0;
while(1)
{
@ -330,7 +335,7 @@ inline int PSYC_parseElement(
}
}
++(*vlength);
}
}}
}
}else if(inHeader == 0 && method==0 && data[*cursor] == ' ') // oi, its a binary var!
{ // after SP the length follows.
@ -347,7 +352,7 @@ inline int PSYC_parseElement(
++strln;
}while(isNumeric(data[*cursor]));
// after the length a TAB follows
if(data[*cursor] != '\t')
return -8;