Homologous structures CAN have the same function...the key is that they're from the same origin. Let's put this to rest once and for all people! lol
Analagous - same function, can look similar, different origin (convergent evolution) - results from the same environmental pressures being put on two unlike organisms
Homologous - can be same function or different function, looks similar, and are from the SAME origin - divergent evolution - results from different environmental pressures being put on two LIKE organisms