[ipaccess] Create a method to send the ID ACK messages
diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h
index 8c12e59..dbd9f37 100644
--- a/openbsc/include/openbsc/ipaccess.h
+++ b/openbsc/include/openbsc/ipaccess.h
@@ -48,6 +48,7 @@
int ipaccess_rcvmsg_base(struct msgb *msg, struct bsc_fd *bfd);
struct msgb *ipaccess_read_msg(struct bsc_fd *bfd, int *error);
void ipaccess_prepend_header(struct msgb *msg, int proto);
+int ipaccess_send_id_ack(int fd);
/*
* Firmware specific header
diff --git a/openbsc/src/input/ipaccess.c b/openbsc/src/input/ipaccess.c
index 90d7cea..6c7ab03 100644
--- a/openbsc/src/input/ipaccess.c
+++ b/openbsc/src/input/ipaccess.c
@@ -164,6 +164,12 @@
return 0;
}
+/* send the id ack */
+int ipaccess_send_id_ack(int fd)
+{
+ return write(fd, id_ack, sizeof(id_ack));
+}
+
/* base handling of the ip.access protocol */
int ipaccess_rcvmsg_base(struct msgb *msg,
struct bsc_fd *bfd)
@@ -180,7 +186,7 @@
break;
case IPAC_MSGT_ID_ACK:
DEBUGP(DMI, "ID_ACK? -> ACK!\n");
- ret = write(bfd->fd, id_ack, sizeof(id_ack));
+ ret = ipaccess_send_id_ack(bfd->fd);
break;
}
return 0;