Characterization of weakly sharp solutions of a variational-type inequality with convex functional