Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
    updated to latest ticcutils
  • Loading branch information
kosloot committed Dec 5, 2024
1 parent 662ff8a commit 0ad2115
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/timblserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
schedule:
- cron: "0 20 3 * 5" # run test once a month
push:
branches: [master]
branches:
- master
- develop
paths:
- configure.ac
- 'src/**'
Expand Down Expand Up @@ -44,10 +46,12 @@ jobs:

- uses: LanguageMachines/ticcactions/cpp-submodule-build@v1
with:
branch: ${{ github.ref_name }}
module: ticcutils

- uses: LanguageMachines/ticcactions/cpp-submodule-build@v1
with:
branch: ${{ github.ref_name }}
module: timbl

- uses: LanguageMachines/ticcactions/setup-cppcheck@v1
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ else
fi

AC_OSX_PKG( [icu4c] )
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.35] )
PKG_CHECK_MODULES([ticcutils], [ticcutils >= 0.36] )
CXXFLAGS="$CXXFLAGS $ticcutils_CFLAGS"
LIBS="$LIBS $ticcutils_LIBS"

Expand Down
18 changes: 11 additions & 7 deletions src/HttpServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,16 @@ void HttpServer::callback( childArgs *args ){
if ( client ){
TiCC::LogStream LS( &logstream() );
TiCC::LogStream DS( &logstream() );
DS.message(logLine);
LS.message(logLine);
DS.setstamp( StampBoth );
LS.setstamp( StampBoth );
TiCC::XmlDoc doc( "TiMblResult" );
xmlNode *root = doc.getRoot();
DS.set_message(logLine);
LS.set_message(logLine);
DS.set_stamp( StampBoth );
LS.set_stamp( StampBoth );
xmlDoc *doc = xmlNewDoc( TiCC::to_xmlChar("1.0") );
xmlNode *root = xmlNewDocNode( doc,
0,
TiCC::to_xmlChar("TiMblResult" ),
0 );
xmlDocSetRootElement( doc, root );
TiCC::XmlSetAttribute( root, "algorithm",
TiCC::toString(client->_exp->Algorithm()) );
vector<string> avs = TiCC::split_at( qstring, "&" );
Expand Down Expand Up @@ -237,7 +241,7 @@ void HttpServer::callback( childArgs *args ){
++it;
}
}
string out_line = doc.toString();
string out_line = TiCC::serialize(*doc);
timeout=10;
nb_putline( args->os(), out_line , timeout );
delete client;
Expand Down
6 changes: 3 additions & 3 deletions src/TimblServer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,15 @@ int main(int argc, char *argv[]){
}
if ( protocol == "tcp" ){
server = new TcpServer( config );
server->logstream().message("tcp_server");
server->logstream().set_message("tcp_server");
}
else if ( protocol == "http" ){
server = new HttpServer( config );
server->logstream().message("http_server");
server->logstream().set_message("http_server");
}
else if ( protocol == "json" ){
server = new JsonServer( config );
server->logstream().message("json_server");
server->logstream().set_message("json_server");
}
else {
cerr << "unknown protocol " << protocol << endl;
Expand Down
2 changes: 1 addition & 1 deletion src/TimblThread.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ TimblThread::TimblThread( TimblExperiment *exp,
is(args->is())
{
if ( doDebug ){
myLog.setlevel(LogHeavy);
myLog.set_level(LogHeavy);
}
_exp = exp->clone();
*_exp = *exp;
Expand Down

0 comments on commit 0ad2115

Please sign in to comment.