Opened 13 years ago

Closed 13 years ago

#9725 closed Patch - Bug Fix (fixed)

[PATCH] Frontend network control does not always return a prompt

Reported by: Gregory Moyer <moyerg@…> Owned by: Raymond Wagner
Priority: minor Milestone: 0.25
Component: MythTV - General Version: Master Head
Severity: medium Keywords: frontend network control
Cc: Ticket locked: no

Description

When using the frontend network control, if a command does not generate any result, nothing is sent back to the client. This means that no prompt is sent back to the client as well.

The problem is in mythtv/programs/mythfrontend/networkcontrol.cpp in NetworkControl::processNetworkControlCommand(NetworkCommand? *nc). If a command does not return any result (e.g. 'query recordings' when there are no recordings), the if check will resolve to 'false' and nothing (including the prompt) is sent back.

Frontend version log, logs of example sessions using netcat before and after the patch, and a patch removing the if condition will be attached. I have only tested this patch lightly, but it seems to work well.

If removing this if condition is not acceptable, the other route is to make sure all commands return something. In the case of 'query recordings' something like 'No recordings found.' could be returned. This seems like a more difficult and error prone way to fix this though.

Attachments (4)

mythfrontend.version.log (667 bytes) - added by Gregory Moyer <moyerg@…> 13 years ago.
frontend version output
nc-before-patch.log (173 bytes) - added by Gregory Moyer <moyerg@…> 13 years ago.
netcat before patch
nc-after-patch.log (176 bytes) - added by Gregory Moyer <moyerg@…> 13 years ago.
netcat after patch
fenc-fix-no-prompt-on-empty-result.patch (864 bytes) - added by Gregory Moyer <moyerg@…> 13 years ago.
patch removing if condition

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by Gregory Moyer <moyerg@…>

Attachment: mythfrontend.version.log added

frontend version output

Changed 13 years ago by Gregory Moyer <moyerg@…>

Attachment: nc-before-patch.log added

netcat before patch

Changed 13 years ago by Gregory Moyer <moyerg@…>

Attachment: nc-after-patch.log added

netcat after patch

Changed 13 years ago by Gregory Moyer <moyerg@…>

patch removing if condition

comment:1 Changed 13 years ago by Raymond Wagner

Owner: set to Raymond Wagner
Status: newaccepted

comment:2 Changed 13 years ago by Github

Milestone: unknown0.25
Resolution: fixed
Status: acceptedclosed

Alters frontend network control to no prevent an empty response to a query. Fixes #9725. Patch by Gregory Moyer.

Branch: master Changeset: 6ffb557d657dcca232b4335213eccfa6825c5de5

Note: See TracTickets for help on using tickets.