Skip Menu |

This queue is for tickets about the POE-Component-Client-opentick CPAN distribution.

Report information
The Basics
Id: 40364
Status: resolved
Worked: 2.2 hours (135 min)
Priority: 0/
Queue: POE-Component-Client-opentick

People
Owner: INFIDEL [...] cpan.org
Requestors: yikes2000 [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.15
Fixed in: 0.20



Subject: Broken get_status() when ot_status_changed
When receiving ot_status_changed event, calling Client::opentick object's get_status() will return undef. Side note: calling get_status() when receiving ot_on_login will return the correct status. This bug is somewhat critical because opentick has been flaky lately, ot_status_changed seems to be the only event triggered when Client::opentick reconnects (shouldn't ot_on_login too?).
From: yikes2000 [...] yahoo.com
Also, Client::opentick object's ready() always returns false when called upon receiving ot_status_changed event. The two are related, as they both rely on $self->{READY}.
From: yikes2000 [...] yahoo.com
Found the problem in opentick.pm's sub _status_changed. Patch below: --- opentick.pm.orig 2008-10-24 23:34:01.000000000 -0700 +++ opentick.pm 2008-10-24 23:31:38.000000000 -0700 @@ -370,7 +370,7 @@ sub _status_changed { - my( $self, $status ) = @_[OBJECT, ARG2]; + my( $self, $status ) = @_[OBJECT, ARG0]; return( $self->{READY} = $status ); }
On Sat Oct 25 02:15:46 2008, Yikes2000 wrote: Show quoted text
> When receiving ot_status_changed event, calling Client::opentick > object's get_status() will return undef. Side note: calling > get_status() when receiving ot_on_login will return the correct status. > > This bug is somewhat critical because opentick has been flaky lately, > ot_status_changed seems to be the only event triggered when > Client::opentick reconnects (shouldn't ot_on_login too?).
Despite trying over a couple of hours, I was unable to reproduce this issue. Perhaps with opentick.com being less flakey now, it will take a while. I did trace through the entire call tree to isolate why ot_status_changed would be called, but ot_on_login would not, and there is no reason that should be the case. Every time, I always received both events upon reconnection.
I added this patch to the code (thanks for catching this!). + my( $self, $status ) = @_[OBJECT, ARG0]; I'm going to close this ticket for the time being, based on adding this patch; but if you notice it continuing to be an issue, please go ahead and reopen this ticket (or create a new one) with any additional information you can provide. --- Full Changelog: --------------- 0.20 Nov 23, 2008 BUG: I think I fixed the build errors on Solaris, Win32 and Darwin in one fell swoop. Silly caching network stacks. { BUG: RT #39733: Wrong $field_datatypes for OT_DATATYPE_OHLC, Record.pm BUG: RT #39734: Minor typo in documentation for Record.pm BUG: RT #40364: Broken get_status() when ot_status_changed, opentick.pm BUG: RT #40573: Annoying Dumper() in Protocol.pm } -- thanks, A.L.! FIX: t/13-Output.t would fail on 5.6.2 due to scalar refs; skipped. DOC: Added Frequently Asked Questions list based on email questions.