src: Making use of DEPRECATED macro and updating library code not to use deprecated methods

Change-Id: Ibe17977e7fcbb759a26dbe1cfa3d472598e49bcc
diff --git a/src/detail/face-impl.hpp b/src/detail/face-impl.hpp
index 52f9dd3..7913831 100644
--- a/src/detail/face-impl.hpp
+++ b/src/detail/face-impl.hpp
@@ -251,7 +251,10 @@
           m_processEventsTimeoutTimer->cancel();
         }
       }
-    onSuccess();
+
+    if (static_cast<bool>(onSuccess)) {
+      onSuccess();
+    }
   }
 
   /////////////////////////////////////////////////////////////////////////////////////////////////