Successful status code is badly formatted for STA command
Bug #395464 reported by
eMTee
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DC++ |
Fix Released
|
Low
|
Unassigned |
Bug Description
From the protocol :
Status code in the form "xyy" where x specifies severity and yy the specific error code.
0 Success (used for confirming commands), error code must be "00",
This solution is from StrongDC++ so if its accepted, it must be credited to BigMuscle.
Changed in dcplusplus: | |
status: | New → Confirmed |
Changed in dcplusplus: | |
status: | Confirmed → Fix Committed |
To post a comment you must log in.
Actually i think it should look more like this:
addParam( sev==SEV_ SUCCESS ? "000" : Util::toString(sev * 100 + err));
Protocol states:
Success (used for confirming commands), error code must be "00", and an additional flag "FC" contains the FOURCC of the command being confirmed if applicable.
sev == 0 should always have err == 0, thus no need to consider err when sev==0. Also your way would make 010 to be 10.