Ojha made a valiant 52 against a potent Proteas attack led by Dale Steyn, who got the wicketkeeper caught by Hashim Amla.
"I have been playing for a long time in domestic cricket, so I have learnt from my mistakes and the mistakes I made in Sri Lanka. I will not get out through my mistakes," said the Madhya Pradesh player after his 80-ball knock, laced with 7 fours and a six, at the Brabourne Stadium here.
Ojha, 32, was batting well in his debut Test innings against Sri Lanka in the third match of the series at the SSC ground before he got a rush of blood and got out to off spinner Tharindu Kaushal for 21.
He also made 35 in the second innings in the match in which he replaced injured first choice stumper Wriddhiman Saha.
More From This Section
"The knock is important for me and for my confidence in innings building for the season. If you have some runs behind you, it's easy to play next game. It's important for the confidence," said Ojha after the day's play.
He did not want to talk about rivalry for the India Test wicketkeeper's spot with Saha.
"My focus is on performance, if I perform (well) I am going to be happy."
He complimented the South African spin attack against whom he got the majority of his runs today.
Asked about rookie medium-pacer Nathu Singh, who bowled three overs and hardly made the rival openers play the ball, Ojha said the Rajasthan youngster bowled with good pace.
"He bowled quick. His line was a bit wayward, but the ball was hitting my hand (gloves) as he was bowling quick.