A recently released prisoner who harassed his former partner after he had been banned from any contact with her has been handed more jail time.