<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>11605</bug_id>
          
          <creation_ts>2007-04-23 13:39:02 +0400</creation_ts>
          <short_desc>login command is b0rken when using script</short_desc>
          <delta_ts>2007-06-16 21:21:20 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>KoLmafia</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sir Raorn">raorn</reporter>
          <assigned_to name="Nobody&apos;s working on this, feel free to take it">nobody</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>49350</commentid>
    <comment_count>0</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2007-04-23 13:39:03 +0400</bug_when>
    <thetext>$ KoLmafia --CLI daily.ash


KoLmafia v10.9
Running on Linux
Using Java 1.5.0_11


Validating login server...

...

Validating login server...
...
Concurrent logins detected.  Debug log printed.
java.lang.Exception


В скрипте первой строчкой:

cli_command(&quot;login username&quot;);

Проблема в коде:

if ( command.equals( &quot;login&quot; ) )
{
        executeCommand( &quot;logout&quot;, &quot;&quot; );
        String password = getSaveState( parameters );

        if ( password != null )
                RequestThread.postRequest( new LoginRequest( parameters,
password ) );
        else
                updateDisplay( ERROR_STATE, &quot;No password saved for that
username.&quot; );

        return;
}

// Next, handle any requests that request exiting.
// Note that a logout request should be sent in
// order to be friendlier to the server, if the
// character has already logged in.

if ( command.equals( &quot;logout&quot; ) )
{
    ...

        if ( StaticEntity.getClient() == DEFAULT_SHELL )
                DEFAULT_SHELL.attemptLogin();

        return;
}

Команда login зовёт logout, и потом логинится, а logout в свою очередь тоже
логинится.  В 10.9 release logout не выполнялся.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49357</commentid>
    <comment_count>1</comment_count>
    <who name="Damir Shayhutdinov">damir</who>
    <bug_when>2007-04-23 14:32:48 +0400</bug_when>
    <thetext>Нужно просто откатить тот патч, который вносит это изменение?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49358</commentid>
    <comment_count>2</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2007-04-23 14:37:48 +0400</bug_when>
    <thetext>Ну наверно.

@@ -957,14 +966,11 @@ public class KoLmafiaCLI extends KoLmafia
 
                if ( command.equals( &quot;login&quot; ) )
                {
-                   RequestThread.postRequest( new LogoutRequest() );
-                   KoLRequest.chooseRandomServer();
-
+                     executeCommand( &quot;logout&quot;, &quot;&quot; );</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49419</commentid>
    <comment_count>3</comment_count>
      <attachid>1923</attachid>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2007-04-24 11:05:43 +0400</bug_when>
    <thetext>Created attachment 1923
KoLmafia-10.9-fix-logout.patch

Проще задавить перелогинивание.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51463</commentid>
    <comment_count>4</comment_count>
    <who name="Damir Shayhutdinov">damir</who>
    <bug_when>2007-06-16 13:34:04 +0400</bug_when>
    <thetext>Давно исправлено.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51469</commentid>
    <comment_count>5</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2007-06-16 21:21:20 +0400</bug_when>
    <thetext>Ага, в апстриме.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1923</attachid>
            <date>2007-04-24 11:05:43 +0400</date>
            <delta_ts>2007-04-24 11:05:43 +0400</delta_ts>
            <desc>KoLmafia-10.9-fix-logout.patch</desc>
            <filename>KoLmafia-10.9-fix-logout.patch</filename>
            <type>text/plain</type>
            <size>567</size>
            <attacher name="Sir Raorn">raorn</attacher>
            
              <data encoding="base64">ZGlmZiAtdXJOIEtvTG1hZmlhLTEwLjktb3JpZy9zcmMvbmV0L3NvdXJjZWZvcmdlL2tvbG1hZmlh
L0tvTG1hZmlhQ0xJLmphdmEgS29MbWFmaWEtMTAuOS9zcmMvbmV0L3NvdXJjZWZvcmdlL2tvbG1h
ZmlhL0tvTG1hZmlhQ0xJLmphdmEKLS0tIEtvTG1hZmlhLTEwLjktb3JpZy9zcmMvbmV0L3NvdXJj
ZWZvcmdlL2tvbG1hZmlhL0tvTG1hZmlhQ0xJLmphdmEJMjAwNy0wNC0yNCAxMDo1Mjo1NiArMDQw
MAorKysgS29MbWFmaWEtMTAuOS9zcmMvbmV0L3NvdXJjZWZvcmdlL2tvbG1hZmlhL0tvTG1hZmlh
Q0xJLmphdmEJMjAwNy0wNC0yNCAxMDo1ODoyOCArMDQwMApAQCAtOTk3LDkgKzk5Nyw2IEBACiAJ
CQlpZiAoICFLb0xDaGFyYWN0ZXIuZ2V0VXNlck5hbWUoKS5lcXVhbHMoICIiICkgKQ0KIAkJCQlS
ZXF1ZXN0VGhyZWFkLnBvc3RSZXF1ZXN0KCBuZXcgTG9nb3V0UmVxdWVzdCgpICk7DQogDQotCQkJ
aWYgKCBTdGF0aWNFbnRpdHkuZ2V0Q2xpZW50KCkgPT0gREVGQVVMVF9TSEVMTCApDQotCQkJCURF
RkFVTFRfU0hFTEwuYXR0ZW1wdExvZ2luKCk7DQotDQogCQkJcmV0dXJuOw0KIAkJfQ0KIA0K
</data>

          </attachment>
      

    </bug>

</bugzilla>