Do you have a bunch of idle dwarves sitting around? Transferring items between stockpiles will be a fairly low-priority task, so you might not see it done right away or at all if your dwarves are mostly busy. However, if you see a dwarf actively put the wrong item into a stockpile (as opposed to simply not transferring an item out) that would prove that your stockpile settings aren't working.

In that case, you could try deleting both stockpiles and creating new ones. As with most unexpected behaviors in Dwarf Fortress, this could be a bug!

How are you setting the stockpile settings? I once had trouble trying to figure out how to alter existing stockpiles.

If you're trying to alter a stockpile that already exists: Use Q as if you were adding items to a workshop queue, and then choose the appropriate option.

If you're adding a new stockpile with custom settings: Go to the new stockpile screen, set the custom settings with t, (I think) use c to choose the 'Custom' stockpile, and then place the new stockpile.