Bug squashing.
git-svn-id: http://op25.osmocom.org/svn/trunk@253 65a5c917-d112-43f1-993d-58c26a4786be
This commit is contained in:
parent
431bc45d8a
commit
8d97e73d74
|
@ -82,9 +82,7 @@ _op25_la_SOURCES = \
|
|||
software_imbe_decoder.cc \
|
||||
vc55_imbe_decoder.cc \
|
||||
value_string.cc \
|
||||
pickle.cc \
|
||||
golay.cc \
|
||||
hamming.cc
|
||||
pickle.cc
|
||||
|
||||
# magic flags
|
||||
_op25_la_LDFLAGS = $(NO_UNDEFINED) -module -avoid-version
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
#include <errno.h>
|
||||
#include <iomanip>
|
||||
#include <netinet/in.h>
|
||||
#include <p25cai_du_handler.h>
|
||||
|
@ -44,11 +45,12 @@ p25cai_du_handler::p25cai_du_handler(data_unit_handler_sptr next, const char *ad
|
|||
inet_aton(addr, &sin.sin_addr);
|
||||
d_cai = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if(-1 != d_cai) {
|
||||
if(-1 == connect(d_cai, (struct sockaddr*) &sin, sizeof(sin))) {
|
||||
if(-1 != connect(d_cai, (struct sockaddr*) &sin, sizeof(sin))) {
|
||||
ostringstream address;
|
||||
address << addr << ":" << port;
|
||||
d_address = address.str();
|
||||
} else {
|
||||
printf("error %d: %s\n", errno, strerror(errno));
|
||||
perror("connect(d_tap, (struct sockaddr*) &sin, sizeof(sin))");
|
||||
close(d_cai);
|
||||
d_cai = -1;
|
||||
|
|
Reference in New Issue