Bug 509288 - (long-prompt) Prompts longer than the width of the terminal are not properly matched by #prompt.
Prompts longer than the width of the terminal are not properly matched by #pr...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: powwow (Show other bugs)
11
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Kalev Lember
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-01 23:19 EDT by Tomáš Windsor
Modified: 2009-09-06 16:42 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.2.16-1.fc10
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-06 16:40:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch: match prompts longer than terminal width (1.23 KB, patch)
2009-08-06 14:51 EDT, Kalev Lember
no flags Details | Diff
updated patch to fix long prompt matching (771 bytes, patch)
2009-08-07 06:07 EDT, Kalev Lember
no flags Details | Diff

  None (edit)
Description Tomáš Windsor 2009-07-01 23:19:20 EDT
Description of problem:
Prompts longer than the width of the terminal are not properly matched by #prompt.

Version-Release number of selected component (if applicable):
1.2.15-1.fc11

How reproducible:
Always.

Steps to Reproduce:
1. define #prompt that matches all MUME prompts
2. connect to MUME and get a long enough prompt (e.g. through labelled charmies) in gameplay
  
Actual results:
Defined #prompt doesn't trigger on the long prompt.

Expected results:
Defined #prompt triggers on the long prompt.

Additional info:
In earlier versions of powwow, I've been using special patch for this, which might have some side effects though (yet I didn't see any); here it is:
--- main.c.orig 2005-10-22 01:21:48.000000000 +0200
+++ main.c      2006-01-24 15:05:44.000000000 +0100
@@ -693,7 +693,7 @@
      * match #prompts. They usually have no #print, so we print manually
      * if islast is not set and a #prompt matches.
      */
-    if ((is_iac_prompt || islast || printstrlen(linestart) < cols) &&
+    if (/*(is_iac_prompt || islast || printstrlen(linestart) < cols) && */
        ((search_prompt(linestart, 1) && surely_isprompt) || is_iac_prompt)) {
 
        char *reprint;
Comment 1 Kalev Lember 2009-07-09 09:46:56 EDT
Does the problem go away if you do "#request prompt"?
Comment 2 Tomáš Windsor 2009-07-09 21:12:14 EDT
No, it does not.
Comment 3 Tomáš Windsor 2009-08-03 15:44:10 EDT
Problem actually goes away after "#request prompt", but one must not use mmapper2. With mmapper2 it doesn't go away even then.

But anyway, this is just a workaround which doesn't happen to work when other software is used. The original bug is still there. (It should work even without #request prompt)
Comment 4 Kalev Lember 2009-08-06 14:51:29 EDT
Created attachment 356570 [details]
patch: match prompts longer than terminal width
Comment 5 Kalev Lember 2009-08-06 14:53:22 EDT
Please test the attached patch, it should properly fix the issue.
Comment 6 Kalev Lember 2009-08-07 06:07:08 EDT
Created attachment 356631 [details]
updated patch to fix long prompt matching

I had missed a case with IAC end-of-prompt marker. However, now the patch is down to oneliner.
Comment 7 Fedora Update System 2009-08-07 06:26:16 EDT
powwow-1.2.15-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/powwow-1.2.15-3.fc11
Comment 8 Fedora Update System 2009-08-07 06:26:21 EDT
powwow-1.2.15-3.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/powwow-1.2.15-3.fc10
Comment 9 Fedora Update System 2009-08-08 15:21:21 EDT
powwow-1.2.15-3.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8368
Comment 10 Fedora Update System 2009-08-08 15:33:11 EDT
powwow-1.2.15-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8408
Comment 11 Tomáš Windsor 2009-08-09 10:44:03 EDT
Long prompts now work correctly, but occasionally some of the prompts (witnessed on 2 short prompts so far) don't get matched against the defined #prompts. It happens very rarely though, and so far I've not been able to identify a common pattern.
Comment 12 Fedora Update System 2009-09-01 17:04:54 EDT
powwow-1.2.16-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/powwow-1.2.16-1.fc10
Comment 13 Fedora Update System 2009-09-01 17:04:59 EDT
powwow-1.2.16-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/powwow-1.2.16-1.fc11
Comment 14 Fedora Update System 2009-09-02 20:30:39 EDT
powwow-1.2.16-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9237
Comment 15 Fedora Update System 2009-09-02 20:32:28 EDT
powwow-1.2.16-1.fc10 has been pushed to the Fedora 10 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update powwow'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9245
Comment 16 Fedora Update System 2009-09-06 16:40:30 EDT
powwow-1.2.16-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 17 Fedora Update System 2009-09-06 16:42:31 EDT
powwow-1.2.16-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.