Skip to content

Commit

Permalink
udp: remove very old iOS hack
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored and sreimers committed Sep 16, 2022
1 parent 416a585 commit 22e7962
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/udp/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif
#ifdef __APPLE__
#include "TargetConditionals.h"
#endif
#include <re_types.h>
#include <re_fmt.h>
#include <re_mem.h>
Expand Down Expand Up @@ -177,46 +174,6 @@ static void udp_read(struct udp_sock *us, re_sock_t fd)
if (EWOULDBLOCK == err)
goto out;
#endif

#if TARGET_OS_IPHONE
if (ENOTCONN == err) {

struct udp_sock *us_new;
struct sa laddr;

err = udp_local_get(us, &laddr);
if (err)
goto out;

if (BAD_SOCK != us->fd) {
fd_close(us->fd);
(void)close(us->fd);
us->fd = -1;
}

if (BAD_SOCK != us->fd6) {
fd_close(us->fd6);
(void)close(us->fd6);
us->fd6 = -1;
}

err = udp_listen(&us_new, &laddr, NULL, NULL);
if (err)
goto out;

us->fd = us_new->fd;
us->fd6 = us_new->fd6;

us_new->fd = BAD_SOCK;
us_new->fd6 = BAD_SOCK;

mem_deref(us_new);

udp_thread_attach(us);

goto out;
}
#endif
if (us->eh)
us->eh(err, us->arg);

Expand Down

0 comments on commit 22e7962

Please sign in to comment.