1
0
forked from 0ad/0ad

Autobuilder: Notify autologger of commits.

Interact.cpp: Added category to LOG calls.
Atlas: Renamed all handler source files, so they won't conflict with
other files of the same name. (Fixes bug #77)

This was SVN commit r3721.
This commit is contained in:
Ykkrosh 2006-04-03 21:08:58 +00:00
parent d9944f9524
commit 001e951066
8 changed files with 28 additions and 8 deletions

View File

@ -1,7 +1,5 @@
#include "precompiled.h"
#include "CLogger.h"
#include "Interact.h"
#include "Renderer.h"
#include "input.h"
@ -26,6 +24,9 @@
#include "MathUtil.h"
#include "graphics/GameView.h"
#include "ps/CLogger.h"
#define LOG_CATEGORY "world"
extern CConsole* g_Console;
extern CStr g_CursorName;
extern float g_xres, g_yres;
@ -838,13 +839,13 @@ int CSelectedEntities::loadRankTextures()
const char* filename = it->c_str();
if ( !tex_is_known_extension(filename) )
{
LOG(ERROR, "Unknown rank texture extension (%s)", filename);
LOG(ERROR, LOG_CATEGORY, "Unknown rank texture extension (%s)", filename);
continue;
}
Handle ht = ogl_tex_load(filename);
if (ht <= 0)
{
LOG(ERROR, "Rank Textures", "loadRankTextures failed on \"%s\"", filename);
LOG(ERROR, LOG_CATEGORY, "loadRankTextures failed on \"%s\"", filename);
return ht;
}
m_rankTextures[it->AfterLast("/")] = ht;

View File

@ -9,7 +9,7 @@ use constant EXIT_NOTCOMPILED => 1;
use constant EXIT_FAILED => 2;
use constant EXIT_ABORTED => 3;
use POE qw(Component::Server::TCP Filter::HTTPD Filter::Line);
use POE qw(Component::Server::TCP Component::Client::HTTP Filter::HTTPD Filter::Line);
use HTTP::Response;
use Win32::Process;
@ -32,6 +32,8 @@ sub LOG {
print $msg;
}
my $main_session; # main POE::Session object
POE::Component::Server::TCP->new(
Alias => "web_server",
Port => 57470,
@ -59,6 +61,7 @@ POE::Component::Server::TCP->new(
abort_build();
$response->push_header('Content-type', 'text/plain');
$response->content("Build initiated.");
$kernel->post($main_session, 'commit_notify');
}
elsif ($url eq '/force_build.html')
{
@ -186,10 +189,14 @@ EOF
$heap->{client}->put($response);
$kernel->yield("shutdown");
}
},
);
POE::Session->create(
POE::Component::Client::HTTP->spawn(
Alias => "web_client",
);
$main_session = POE::Session->create(
inline_states => {
_start => sub {
$_[KERNEL]->delay(tick => 1);
@ -226,7 +233,19 @@ POE::Session->create(
start_build(commit => 1);
$commit_required = 0;
}
}
},
commit_notify => sub {
$_[KERNEL]->post('web_client', 'request', 'commit_notify_response',
new HTTP::Request(GET => 'http://192.168.0.223/wfg/svnlog.cgi/logupdate/doupdate'));
},
commit_notify_response => sub {
my $response_packet = $_[ARG1];
my $response = $response_packet->[0];
LOG "notified - ".$response->content;
},
}
);