Francois Gouget : testbot/testagentd: Reset the status when handling a new client.

Alexandre Julliard julliard at winehq.org
Tue Dec 11 13:33:32 CST 2012


Module: tools
Branch: master
Commit: 23453c79aa6a08d2891d7b32ad84f2006b7b07e7
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=23453c79aa6a08d2891d7b32ad84f2006b7b07e7

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Dec 11 12:17:13 2012 +0100

testbot/testagentd: Reset the status when handling a new client.

Otherwise, once the status has been set to FATAL, it cannot be set to
anything else anymore, even for other clients.

---

 testbot/src/testagentd/testagentd.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/testbot/src/testagentd/testagentd.c b/testbot/src/testagentd/testagentd.c
index fc3a840..13d16e4 100644
--- a/testbot/src/testagentd/testagentd.c
+++ b/testbot/src/testagentd/testagentd.c
@@ -155,6 +155,8 @@ void set_status(int newstatus, const char* format, ...)
         status = newstatus;
         if (newstatus == ST_FATAL)
             broken = 1;
+        else if (newstatus == ST_OK)
+            broken = 0;
         va_start(valist, format);
         vset_status_msg(format, valist);
         va_end(valist);
@@ -1145,7 +1147,9 @@ int main(int argc, char** argv)
         {
             if (is_host_allowed(client, opt_srchost, addrlen))
             {
-                broken = 0;
+                /* Reset the status so new non-fatal errors can be set */
+                set_status(ST_OK, "ok");
+
                 /* Send the version right away */
                 send_string(client, PROTOCOL_VERSION);
 




More information about the wine-cvs mailing list