The 40D is an excellent camera, especially for the price. (around $375-$425 used) It is a very capable camera. I would suggest that unless you're exceeding the capabilities of your XTi and your capabilities are limited by the XTi, then the 40D is the way to go. The 7D is a very nice camera too, but you're looking at spending an additional $900 or so. I'm sure you know this, but for the majority of hobby photographers out there, a better camera body will not produce better photographs. Time, experience, and knowledge will.
Hope this helps,