preserve 'when' flags of new osmo_fd in ipaccess_rcvmsg()

ipaccess_rcvmsg() disposes of a temporary osmo_fd structure after
the RSL link comes up. It copies data from its temporary osmo_fd
to the new one returned by sign_link_up(). However, in doing so,
it clobbered the 'when' flags, which could differ between the two
osmo_fd structures.
For instance, BSC_FD_WRITE could be set on the new osmo_fd but
not on the old one, in case sign_link_up() has already enqueued
outbound messages using the new osmo_fd.

Because of this behaviour, a patch committed to osmo-bsc to address
issue #2719 did not work as intended and had to be reverted.
After this change, that osmo-bsc patch should work as intended
and issue #2719 can hopefully be resolved.

Change-Id: I52f7c903212b38e9c87e4d45e52b231b6f1ae9f5
Related: OS#2719
diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c
index 5eee57e..9a80d8e 100644
--- a/src/input/ipaccess.c
+++ b/src/input/ipaccess.c
@@ -194,7 +194,11 @@
 			newbfd = &ts->driver.ipaccess.fd;
 
 			/* get rid of our old temporary bfd */
-			memcpy(newbfd, bfd, sizeof(*newbfd));
+			memcpy(&newbfd->list, &bfd->list, sizeof(newbfd->list));
+			newbfd->fd = bfd->fd;
+			newbfd->when |= bfd->when; /* preserve 'newbfd->when' flags potentially set by sign_link_up() */
+			newbfd->cb = bfd->cb;
+			newbfd->data = bfd->data;
 			newbfd->priv_nr = E1INP_SIGN_RSL + unit_data.trx_id;
 			osmo_fd_unregister(bfd);
 			bfd->fd = -1;