Near a bad smell, one might want to do Sh'ma, the Amidah, blessings, study, or think Torah. Is halacha equally strict about all five acts?
"Just as one separates oneself from excreta, urine, a foul odor, a corpse and the sight of nakedness for Kri'at Shema, so too, he should separate himself for Shemoneh Esreh". —Rambam. Hilchos ...