Bug 134 - Attribute setting is broken for += and -= (all versions affected)
: Attribute setting is broken for += and -= (all versions affected)
Status: RESOLVED FIXED
Product: TORQUE
libtorque
: 2.4.x
: PC Linux
: P5 enhancement
Assigned To: David Beer
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-07 06:31 MDT by Simon Toth
Modified: 2011-06-13 15:56 MDT (History)
2 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Simon Toth 2011-06-07 06:31:01 MDT
The following code needs to be changed in src/lib/Libattr/attr_atomic.c

    /* duplicate current value, if set AND not already dup-ed */

    if (((old + index)->at_flags & ATR_VFLAG_SET) &&
        !((new + index)->at_flags & ATR_VFLAG_SET))
      {
      if ((rc = (pdef + index)->at_set(new + index, old + index, SET)) != 0)
        break;

In the attr_atomic_set function the original call was:
(pdef + index)->at_set(new + index, old + index, plist->al_atopl.op)

That is of course wrong, since it won't duplicate the value unless, the
operation is SET.
Comment 1 David Beer 2011-06-13 15:56:52 MDT
Fixed in all versions.