From b4048c3bfd593fed09c3a197aa656331517fed2a Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 11 Dec 2015 12:26:09 -0500 Subject: [PATCH] blockingUDP: error checking --- src/remote/blockingUDP.h | 2 +- src/remote/blockingUDPTransport.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/remote/blockingUDP.h b/src/remote/blockingUDP.h index 910e5c5..e14cf98 100644 --- a/src/remote/blockingUDP.h +++ b/src/remote/blockingUDP.h @@ -303,7 +303,7 @@ namespace epics { /** * Response handler. */ - std::auto_ptr _responseHandler; + const std::auto_ptr _responseHandler; virtual void processRead(); diff --git a/src/remote/blockingUDPTransport.cpp b/src/remote/blockingUDPTransport.cpp index 483da6f..9723853 100644 --- a/src/remote/blockingUDPTransport.cpp +++ b/src/remote/blockingUDPTransport.cpp @@ -60,6 +60,7 @@ inline int sendto(int s, const char *buf, size_t len, int flags, const struct so (serverFlag ? 0x40 : 0x00) | ((EPICS_BYTE_ORDER == EPICS_ENDIAN_BIG) ? 0x80 : 0x00)) { PVACCESS_REFCOUNT_MONITOR_CONSTRUCT(blockingUDPTransport); + assert(_responseHandler.get()); osiSocklen_t sockLen = sizeof(sockaddr); // read the actual socket info