add support for error codes for CC_ERR
This commit is contained in:
parent
6aa153fd1e
commit
1f3e259eee
11
ChangeLog
11
ChangeLog
|
|
@ -37,6 +37,17 @@ Version NEXT
|
||||||
SCons now check if CC compiler works. We need SCons 1.1 or greater
|
SCons now check if CC compiler works. We need SCons 1.1 or greater
|
||||||
for building FSP now.
|
for building FSP now.
|
||||||
Large file support on Linux is now correctly detected.
|
Large file support on Linux is now correctly detected.
|
||||||
|
Error codes added to CC_ERR command in PROTOCOL. It was long wished
|
||||||
|
feature from ISV. Now there is standard way how to pass error codes
|
||||||
|
from server to client. No such codes are defined yet, but you can
|
||||||
|
use custom error codes in range 0xF000 - 0xFFFF. because no such
|
||||||
|
codes are defined fspd do not sends them in error message, but it
|
||||||
|
now correctly zeroes bb_pos field in CC_ERR reply to indicate
|
||||||
|
that extended error code status is not attached to message. Old
|
||||||
|
fspd versions left this field untouched - it will contain request
|
||||||
|
bb_pos in most, but not all cases. Because we indicate size of
|
||||||
|
extra data to be received, this extended error handling is
|
||||||
|
compatible with "plain FSP over serial" standard.
|
||||||
|
|
||||||
Version 2.8.1b25 - 10 Sep 2009
|
Version 2.8.1b25 - 10 Sep 2009
|
||||||
GNU autotools build system was entirely replaced by SCons
|
GNU autotools build system was entirely replaced by SCons
|
||||||
|
|
|
||||||
20
doc/PROTOCOL
20
doc/PROTOCOL
|
|
@ -252,9 +252,25 @@ CC_VERSION is recommended.
|
||||||
xtra data: not used
|
xtra data: not used
|
||||||
|
|
||||||
reply
|
reply
|
||||||
file position: not used
|
file position: size of extra data
|
||||||
data: ASCIIZ Error string
|
data: ASCIIZ Error string
|
||||||
xtra data: not used
|
xtra data: not required
|
||||||
|
word - error status code
|
||||||
|
|
||||||
|
Error status codes are not currently standardised. If you
|
||||||
|
wish to participate in standardization process join FSP-devel
|
||||||
|
mailing list. For use in your own software use vendor-specific
|
||||||
|
error codes which have reserved range 0xF000 - 0xFFFF.
|
||||||
|
|
||||||
|
Compatibility
|
||||||
|
|
||||||
|
Support for sizing of extra data in reply was added
|
||||||
|
in fsp 2.8.1b26. Previous versions left this field
|
||||||
|
unchanged. In old versions it will most likely contain
|
||||||
|
file position used by requests but not always. In some
|
||||||
|
code paths in fspd it will be just uninitialized memory.
|
||||||
|
Its recommended to check if file position in reply is 2
|
||||||
|
otherwise it should be processed as containing zero.
|
||||||
|
|
||||||
CC_GET_DIR 0x41 - get a directory listing
|
CC_GET_DIR 0x41 - get a directory listing
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -146,6 +146,7 @@ static void send_error (struct sockaddr_in * from, UBUF * ub, const char * msg)
|
||||||
sz=strlen(msg)+1;
|
sz=strlen(msg)+1;
|
||||||
memcpy(ub->buf,msg,sz);
|
memcpy(ub->buf,msg,sz);
|
||||||
ub->cmd = CC_ERR;
|
ub->cmd = CC_ERR;
|
||||||
|
BB_WRITE4(ub->bb_pos,0);
|
||||||
|
|
||||||
server_reply(from,ub,sz,0);
|
server_reply(from,ub,sz,0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user