OpenCollarTeam / OpenCollar

Other
121 stars 127 forks source link

Relay recaptures after safewording. #758

Open toywylie opened 2 years ago

toywylie commented 2 years ago

What version of OpenCollar are you using? 8.2.1000

What behavior did you expect? After safewording the relay should not recapture.

What behavior did you see instead? Relay recaptures after safewording.

What steps does someone need to take to reproduce the problem?

[11:55] RLV Backlog: => Timed Force Sitter sit,c9d1c876-b65f-4c59-84e2-5c492f94ad11,@sit:5002cb1a-9d91-fcf7-efb1-c93428202452=force [11:55] OC White Collar: executes: @sit:5002cb1a-9d91-fcf7-efb1-c93428202452=force [11:55] RLV Backlog: => Timed Force Sitter restrain,c9d1c876-b65f-4c59-84e2-5c492f94ad11,@unsit=n [11:55] OC White Collar: executes: @unsit=n [11:55] OC White Collar: executes: @detach=n

[11:55] OC White Collar: executes: @clear=unsit [11:55] OC White Collar: executes: @detach=y [11:55] OC White Collar: executes: @clear [11:55] OC White Collar: executes: @detach=n [11:55] OC White Collar: Relay temporarily suppressed for 30 seconds due to safeword or clear all. [11:55] OC White Collar: executes: @detach=y [11:55] OC White Collar: executes: @setgroup=y (unset)

[11:55] RLV Backlog: => Timed Force Sitter sit,c9d1c876-b65f-4c59-84e2-5c492f94ad11,@sit:5002cb1a-9d91-fcf7-efb1-c93428202452=force

[11:56] OC White Collar: Relay settings have been restored. [11:56] OC White Collar: executes: @detach=y (unset) [11:56] OC White Collar: executes: @sit:5002cb1a-9d91-fcf7-efb1-c93428202452=force

[11:56] RLV Backlog: => Timed Force Sitter restrain,c9d1c876-b65f-4c59-84e2-5c492f94ad11,@unsit=n [11:56] OC White Collar: executes: @unsit=n [11:56] OC White Collar: executes: @detach=n

mistressohm commented 2 years ago

Looks like the problem is that the RLV Backlog is not purged at safeword or during the 30 seconds following. I'd also suggest setting the relay mode to ASK and/or putting the trap owner onto the untrusted list at that time.

[11:55] RLV Backlog: => Timed Force Sitter @.*** https://github.com/sit :5002cb1a-9d91-fcf7-efb1-c93428202452=force

On Sat, Mar 26, 2022 at 2:02 PM Toy Wylie @.***> wrote:

What version of OpenCollar are you using? 8.2.1000

What behavior did you expect? After safewording the relay should not recapture.

What behavior did you see instead? Relay recaptures after safewording.

What steps does someone need to take to reproduce the problem?

  • Switch the relay on
  • Set to auto
  • Run into a trap to be captured

[11:55] RLV Backlog: => Timed Force Sitter @. https://github.com/sit :5002cb1a-9d91-fcf7-efb1-c93428202452=force [11:55] OC White Collar: executes: @sit https://github.com/sit :5002cb1a-9d91-fcf7-efb1-c93428202452=force [11:55] RLV Backlog: => Timed Force Sitter @. https://github.com/UNSIT=n [11:55] OC White Collar: executes: @UNSIT https://github.com/UNSIT=n [11:55] OC White Collar: executes: @Detach https://github.com/Detach=n

  • Click "REFUSE" in the relay or type RED

[11:55] OC White Collar: executes: @clear https://github.com/clear=unsit [11:55] OC White Collar: executes: @Detach https://github.com/Detach=y [11:55] OC White Collar: executes: @clear https://github.com/clear [11:55] OC White Collar: executes: @Detach https://github.com/Detach=n [11:55] OC White Collar: Relay temporarily suppressed for 30 seconds due to safeword or clear all. [11:55] OC White Collar: executes: @Detach https://github.com/Detach=y [11:55] OC White Collar: executes: @Setgroup https://github.com/Setgroup=y (unset)

  • Stand up, walk away

[11:55] RLV Backlog: => Timed Force Sitter @.*** https://github.com/sit :5002cb1a-9d91-fcf7-efb1-c93428202452=force

  • Nothing happens for 30 seconds
  • Wait for the relay to restore its settings

[11:56] OC White Collar: Relay settings have been restored. [11:56] OC White Collar: executes: @Detach https://github.com/Detach=y (unset) [11:56] OC White Collar: executes: @sit https://github.com/sit :5002cb1a-9d91-fcf7-efb1-c93428202452=force

  • Get recaptured by error

[11:56] RLV Backlog: => Timed Force Sitter @.*** https://github.com/UNSIT=n [11:56] OC White Collar: executes: @UNSIT https://github.com/UNSIT=n [11:56] OC White Collar: executes: @Detach https://github.com/Detach=n

— Reply to this email directly, view it on GitHub https://github.com/OpenCollarTeam/OpenCollar/issues/758, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSHY5HF5M4IHUDC6JIRXJTVB5NNTANCNFSM5RXQF3FA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

toywylie commented 2 years ago

The RLV backlog is my own debugging tool, it just shows what object sent which RLV restrictions over the relay channel.

mistressohm commented 2 years ago

Ok, thanks.

In that case, the issue appears to be with the relay not switching modes or pulling a landowner from the Trust list/placing them on the Untrusted list. Otherwise there's nothing to prevent the relay from re-trapping as soon as the cooldown expires.

(We cannot expect a trap to respond to safeword by turning itself off, so it all has to be managed thru the relay.)

On Sat, Mar 26, 2022 at 4:21 PM Toy Wylie @.***> wrote:

The RLV backlog is my own debugging tool, it just shows what object sent which RLV restrictions over the relay channel.

— Reply to this email directly, view it on GitHub https://github.com/OpenCollarTeam/OpenCollar/issues/758#issuecomment-1079776843, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSHY5BZDTC6BW6ZBJ2S3TLVB55TVANCNFSM5RXQF3FA . You are receiving this because you commented.Message ID: @.***>

toywylie commented 2 years ago

The object is not re-trapping. It is the relay re-seating after cooldown. The object does not send another sit request.

Medea-Destiny commented 2 years ago

From a quick peek, it looks like the relay relies on the listener being switched off. The safeword temporarily sets relay mode directly to off, but doesn't seem to remove the listener. i.e code ought to look like:

        llListenRemove(RELAY_LISTENER);
        g_iMode=0;
        if(!g_iLocked)llOwnerSay("@detach=y");
        llMessageLinked(LINK_SET, NOTIFY,"0Relay temporarily suppressed for 30 seconds due to safeword or clear all.", g_kWearer);
        llSleep(30);
        g_iMode=iOldMode;
        RELAY_LISTENER = llListen(RLV_RELAY_CHANNEL, "", NULL_KEY, "");

Will look more closely to confirm & fix.

toywylie commented 2 years ago

That will trigger the listen() event right after exiting this function. Don't use llSleep(), use a proper timer and a flag for "relay is suspended".

SilkieSabra commented 1 year ago

Is this still an open issue or has there been an update?

SilkieSabra commented 10 months ago

This issue is still open and needs to be resolved.