@@ -392,18 +392,12 @@ static void udp_thread_func(void *p1, void *p2, void *p3)
392
392
LOG_DBG ("sock events 0x%08x" , fds [SOCK ].revents );
393
393
LOG_DBG ("efd events 0x%08x" , fds [EVENT_FD ].revents );
394
394
if ((fds [SOCK ].revents & ZSOCK_POLLIN ) != 0 ) {
395
- if (proxy .role == UDP_ROLE_SERVER ) {
396
- /* Store the remote to send responses with the #XUDPSEND command. */
397
- unsigned int size = sizeof (proxy .remote );
398
-
399
- memset (& proxy .remote , 0 , sizeof (proxy .remote ));
400
- ret = zsock_recvfrom (proxy .sock , (void * )slm_data_buf ,
401
- sizeof (slm_data_buf ), ZSOCK_MSG_DONTWAIT ,
402
- (struct sockaddr * )& proxy .remote , & size );
403
- } else {
404
- ret = zsock_recv (proxy .sock , (void * )slm_data_buf ,
405
- sizeof (slm_data_buf ), ZSOCK_MSG_DONTWAIT );
406
- }
395
+ unsigned int size = sizeof (proxy .remote );
396
+
397
+ memset (& proxy .remote , 0 , sizeof (proxy .remote ));
398
+ ret = zsock_recvfrom (proxy .sock , (void * )slm_data_buf ,
399
+ sizeof (slm_data_buf ), ZSOCK_MSG_DONTWAIT ,
400
+ (struct sockaddr * )& proxy .remote , & size );
407
401
if (ret < 0 && errno != EAGAIN ) {
408
402
LOG_WRN ("zsock_recv() error: %d" , - errno );
409
403
} else if (ret > 0 ) {
0 commit comments