aboutsummaryrefslogtreecommitdiffstats
path: root/examples/rs232-write.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rs232-write.c')
-rw-r--r--examples/rs232-write.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/rs232-write.c b/examples/rs232-write.c
index 11498f3..d5aee68 100644
--- a/examples/rs232-write.c
+++ b/examples/rs232-write.c
@@ -347,6 +347,7 @@ static int kbd_cb(struct osmo_fd *fd, unsigned int what)
int main(void)
{
struct osmo_fd *kbd_ofd;
+ int rc;
tall_test = talloc_named_const(NULL, 1, "osmo_rs232_test");
@@ -379,7 +380,11 @@ int main(void)
kbd_ofd->when = BSC_FD_READ;
kbd_ofd->data = NULL;
kbd_ofd->cb = kbd_cb;
- osmo_fd_register(kbd_ofd);
+ rc = osmo_fd_register(kbd_ofd);
+ if (rc < 0) {
+ LOGP(DRS232TEST, LOGL_ERROR, "FD Register\n");
+ exit(EXIT_FAILURE);
+ }
while(1) {
osmo_select_main(0);