Successful status code is badly formatted for STA command

Bug #395464 reported by eMTee
6
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.

Revision history for this message
eMTee (realprogger) wrote :
Big Muscle (bigmuscle)
Changed in dcplusplus:
status: New → Confirmed
Revision history for this message
Sulan (sulan80) wrote :

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.

Revision history for this message
poy (poy) wrote :

Sulan's way seems fine (with parenthesis around sev==SEV_SUCCESS).

these success codes are only used by DC++ when initiating transfers, to send the referrer string; that is quite important, so please verify before checking in that referrers and connections aren't altered.

Revision history for this message
eMTee (realprogger) wrote :
poy (poy)
Changed in dcplusplus:
status: Confirmed → Fix Committed
Revision history for this message
poy (poy) wrote :

Fixed in DC++ 0.780.

Changed in dcplusplus:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.