[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: SolidDevice engine
From:       "Christopher Blauvelt" <cblauvelt () gmail ! com>
Date:       2008-04-28 5:01:34
Message-ID: ffa898c90804272201u694aa553p89de91fba07b7c5f () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Sun, Apr 27, 2008 at 11:54 PM, Christopher Blauvelt <cblauvelt@gmail.com>
wrote:

>
>
> 2008/4/27 Aaron J. Seigo <aseigo@kde.org>:
>
>> hi ...
>>
>> currently i'm seeing debug about "protocol not supported" from HddTemp
>> approximately once every second.
>>
>> turns out this is coming from the SolidDevice engine, which is used by the
>> device applet.
>>
>> even though temperature is never asked for or used, the HddTemp object is
>> created. worse yet HddTemp itself has an internal timer.
>>
>> of course engines should update themselves only on request, and the timing
>> should be defined by the consumer not any code in the engine itself.
>>
>> now, i'm not sure exactly what the intended use case for the temperature
>> monitor was and i don't like doing things that are too invasive without
>> asking for more info first. so perhaps someone (Petri? Blauvelt?) can shed
>> some light on this.
>>
>> --
>> Aaron J. Seigo
>> humru othro a kohnu se
>> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43
>>
>> KDE core developer sponsored by Trolltech
>>
>> _______________________________________________
>> Panel-devel mailing list
>> Panel-devel@kde.org
>> https://mail.kde.org/mailman/listinfo/panel-devel
>>
>>
> I plan to change how the engine updates the temperature when it's asked
> for.  What's supposed to be happening is if it can't find the server after 4
> tries it stops, so that's obviously not working either.  I didn't realize it
> was causing so much havoc so I'll fix it sooner rather than later.
> Chris
>

Try Attached.

[Attachment #5 (text/html)]

<br><br><div class="gmail_quote">On Sun, Apr 27, 2008 at 11:54 PM, Christopher \
Blauvelt &lt;<a href="mailto:cblauvelt@gmail.com">cblauvelt@gmail.com</a>&gt; \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br><br><div \
class="gmail_quote">2008/4/27 Aaron J. Seigo &lt;<a href="mailto:aseigo@kde.org" \
target="_blank">aseigo@kde.org</a>&gt;:<br><blockquote class="gmail_quote" \
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;"> <div><div></div><div class="Wj3C7c">
hi ...<br>
<br>
currently i&#39;m seeing debug about &quot;protocol not supported&quot; from \
HddTemp<br> approximately once every second.<br>
<br>
turns out this is coming from the SolidDevice engine, which is used by the<br>
device applet.<br>
<br>
even though temperature is never asked for or used, the HddTemp object is<br>
created. worse yet HddTemp itself has an internal timer.<br>
<br>
of course engines should update themselves only on request, and the timing<br>
should be defined by the consumer not any code in the engine itself.<br>
<br>
now, i&#39;m not sure exactly what the intended use case for the temperature<br>
monitor was and i don&#39;t like doing things that are too invasive without<br>
asking for more info first. so perhaps someone (Petri? Blauvelt?) can shed<br>
some light on this.<br>
<font color="#888888"><br>
--<br>
Aaron J. Seigo<br>
humru othro a kohnu se<br>
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA &nbsp;EE75 D6B7 2EB1 A7F1 DB43<br>
<br>
KDE core developer sponsored by Trolltech<br>
</font><br></div></div>_______________________________________________<br>
Panel-devel mailing list<br>
<a href="mailto:Panel-devel@kde.org" target="_blank">Panel-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/panel-devel" \
target="_blank">https://mail.kde.org/mailman/listinfo/panel-devel</a><br> \
<br></blockquote></div><br>I plan to change how the engine updates the temperature \
when it&#39;s asked for.&nbsp; What&#39;s supposed to be happening is if it can&#39;t \
find the server after 4 tries it stops, so that&#39;s obviously not working \
either.&nbsp; I didn&#39;t realize it was causing so much havoc so I&#39;ll fix it \
sooner rather than later.<br>

Chris<br>
</blockquote></div><br>Try Attached.<br>


["hddtemp.diff" (text/x-diff)]

Index: hddtemp.cpp
===================================================================
--- hddtemp.cpp	(revision 801820)
+++ hddtemp.cpp	(working copy)
@@ -53,7 +53,6 @@
 
     socket.connectToHost("localhost", 7634);
     if (socket.waitForConnected(500)) {
-        m_failCount = 0;
         while (data.length() < 1024) {
             if (!socket.waitForReadyRead(500)) {
                 if (data.length() > 0) {
@@ -66,6 +65,8 @@
             data += QString(socket.readAll());
         }
         socket.disconnectFromHost();
+        //on success retry fail count
+        m_failCount = 0;
     } else {
         m_failCount++;
         kDebug() << socket.errorString();


_______________________________________________
Panel-devel mailing list
Panel-devel@kde.org
https://mail.kde.org/mailman/listinfo/panel-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic