I have an idea...
Before people start telling you their problems, they should prepare you by saying: hey I just want you to listen to me talk and I don't need any advice.
Or they might say: hey I'm whining but I still want your thoughts and advice.
Then the person who is receiving the problem can relax and not worry if they are actually helping.