Skip to content

Commit

Permalink
adapted to newest ticcutils Socket stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Ko van der Sloot authored and Ko van der Sloot committed Apr 6, 2020
1 parent 68c5966 commit 1363801
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ AC_ARG_WITH(ticcutils,
[ --with-ticcutils=DIR use ticcutils installed in <DIR>],
[PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
[PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.22] )
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.24] )
CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
LIBS="$ticcutils_LIBS $LIBS"

Expand Down
2 changes: 1 addition & 1 deletion src/generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ int generate_server( Logfile& l, Config& c ) {

while ( true ) {

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down
4 changes: 2 additions & 2 deletions src/levenshtein.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1760,7 +1760,7 @@ int server_sc( Logfile& l, Config& c ) {
while ( running ) { // main accept() loop
l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -2173,7 +2173,7 @@ int server_sc_nf( Logfile& l, Config& c ) {
while ( true ) { // main accept() loop
l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/ngram_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ int ngram_server(Logfile& l, Config& c) {
l.log( "Starting server..." );
std::string buf;
while ( true ) {
Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down
2 changes: 1 addition & 1 deletion src/prededit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ int pdt2web( Logfile& l, Config& c ) {

l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down
14 changes: 7 additions & 7 deletions src/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ int server2(Logfile& l, Config& c) {
// loop
while ( c.get_status() != 0 ) { // main accept() loop

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -893,7 +893,7 @@ int server4( Logfile& l, Config& c) {
while ( running ) { // main accept() loop
l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -1275,7 +1275,7 @@ int xmlserver(Logfile& l, Config& c) {
while ( running ) { // main accept() loop
l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -1650,7 +1650,7 @@ int mbmt(Logfile& l, Config& c) {
while ( running ) { // main accept() loop
l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -1985,7 +1985,7 @@ int webdemo(Logfile& l, Config& c) {
bool skip = false;

while ( true ) {
Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -2186,7 +2186,7 @@ int one( Logfile& l, Config& c) {


while ( true ) {
Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down Expand Up @@ -2467,7 +2467,7 @@ int server_mg( Logfile& l, Config& c ) {
while ( running ) { // main accept() loop
l.log( "Listening..." );

Sockets::ServerSocket *newSock = new Sockets::ServerSocket();
Sockets::ClientSocket *newSock = new Sockets::ClientSocket();
if ( !server.accept( *newSock ) ) {
if( errno == EINTR ) {
continue;
Expand Down

0 comments on commit 1363801

Please sign in to comment.