Permalink
Browse files

Add a check for lo_bundle_count() to build against older versions of …

…liblo.
  • Loading branch information...
1 parent b95ce88 commit af80a53afaf221cc5027f4496aaaa5fc9ad1ed2b @radarsat1 committed Oct 25, 2012
Showing with 4 additions and 0 deletions.
  1. +2 −0 configure.ac
  2. +2 −0 src/router.c
View
2 configure.ac
@@ -239,6 +239,8 @@ AS_IF([test x$with_liblo != xno],[
[AC_DEFINE([HAVE_LIBLO_SET_IFACE],[],[Define to use lo_address_set_iface function in liblo.])])
AC_CHECK_FUNC([lo_server_new_multicast_iface],
[AC_DEFINE([HAVE_LIBLO_SERVER_IFACE],[],[Define to use lo_server_new_multicast_iface function in liblo.])])
+ AC_CHECK_FUNC([lo_bundle_count],
+ [AC_DEFINE([HAVE_LIBLO_BUNDLE_COUNT],[],[Define to use lo_bundle_count function in liblo.])])
LIBS="$tmpLIBS"
])
View
2 src/router.c
@@ -417,7 +417,9 @@ void mapper_router_send_queue(mapper_router r,
q = q->next;
}
if (q) {
+#ifdef HAVE_LIBLO_BUNDLE_COUNT
if (lo_bundle_count(q->bundle))
+#endif
lo_send_bundle_from(r->props.dest_addr,
r->device->server, q->bundle);
lo_bundle_free_messages(q->bundle);

0 comments on commit af80a53

Please sign in to comment.