*/
#include <dpl/log/log.h>
-#include <dpl/serialization.h>
#include <dpl/singleton.h>
#include <dpl/singleton_safe_impl.h>
#include <dpl/test/test_runner.h>
#include <sys/time.h>
#include <sys/un.h>
#include <unistd.h>
-#include <memory>
+#include <memory.h>
#include "security_server_mockup.h"
#include <summary_collector.h>
#include <smack_access.h>
LogDebug("No function call succeeded\n");
}
-void closesockfdptr(int* sockfd_ptr)
-{
- close(*sockfd_ptr);
-}
-typedef std::unique_ptr<int, std::function<void(int*)> > SockFDUniquePtr;
-
/*TEST CASES*/
RUNNER_TEST_GROUP_INIT(SECURITY_SERVER_API_SPEED_MEASURER)
int sockfd = create_new_socket();
RUNNER_ASSERT_MSG_BT(sockfd >= 0, "create_new_socket() failed");
- SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
+ SockUniquePtr sockfd_ptr(&sockfd);
if (smack)
RUNNER_ASSERT_MSG_BT(0 == smack_set_label_for_self(subject_label), "child label " << subject_label << " not set");
int sockfd = connect_to_testserver();
RUNNER_ASSERT_MSG_BT(sockfd >= 0, "connect_to_testserver() failed");
- SockFDUniquePtr sockfd_ptr(&sockfd, closesockfdptr);
+ SockUniquePtr sockfd_ptr(&sockfd);
for (int i = 1; i <= NUMBER_OF_CALLS; i++) {
start_stats_update(&stats);