mirror of https://gerrit.osmocom.org/osmo-pcap
Catch up with API change in osmo_sock_init
The connect0_bind1 parameter has been replaced by a generic flag parameter. With this patch osmo-pcap works (only) with versions of libosmocore 0.3.2 or newer - configure.ac changed to reflects that.
This commit is contained in:
parent
c7401c6c23
commit
b000368ad6
|
@ -15,7 +15,7 @@ AC_PROG_INSTALL
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
dnl checks for libraries
|
dnl checks for libraries
|
||||||
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.0)
|
PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 0.3.2)
|
||||||
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
|
PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.3.0)
|
||||||
|
|
||||||
dnl checks for header files
|
dnl checks for header files
|
||||||
|
|
|
@ -163,7 +163,7 @@ void osmo_client_connect(struct osmo_pcap_client *client)
|
||||||
osmo_wqueue_clear(&client->wqueue);
|
osmo_wqueue_clear(&client->wqueue);
|
||||||
|
|
||||||
fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
|
fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
|
||||||
client->srv_ip, client->srv_port, 0);
|
client->srv_ip, client->srv_port, OSMO_SOCK_F_CONNECT);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
LOGP(DCLIENT, LOGL_ERROR,
|
LOGP(DCLIENT, LOGL_ERROR,
|
||||||
"Failed to connect to %s:%d\n",
|
"Failed to connect to %s:%d\n",
|
||||||
|
|
|
@ -322,7 +322,7 @@ int osmo_pcap_server_listen(struct osmo_pcap_server *server)
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
|
fd = osmo_sock_init(AF_INET, SOCK_STREAM, IPPROTO_TCP,
|
||||||
server->addr, server->port, 1);
|
server->addr, server->port, OSMO_SOCK_F_BIND);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
LOGP(DSERVER, LOGL_ERROR, "Failed to create the server socket.\n");
|
LOGP(DSERVER, LOGL_ERROR, "Failed to create the server socket.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue