[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnatsweb 2.7beta ignoring some server errors + fix
From: |
G. Paul Ziemba |
Subject: |
gnatsweb 2.7beta ignoring some server errors + fix |
Date: |
Wed, 21 Mar 2001 17:27:44 -0800 |
User-agent: |
Mutt/1.2.5i |
When I submit an edit (sub submitedit), sometimes the gnats
server returns an error to the lock command (e.g., "490 ...").
Gnatsweb did not catch that error, and eventually generated a
misleading error message to the effect that:
&$err_sub("PR $pr has been modified since you started editing it.",
"Please return to the edit form, press the Reload button, "
. "then make your edits again.\n"
. "<pre>Last-Modified was '$fields{'Last-Modified'}'\n"
. "Last-Modified is now '$oldfields{'Last-Modified'}'</pre>\n");
because %oldfields did not have any significant values in it.
My fix was to modify lockpr to look for an undef returned by
client_cmd("lock $pr $user") and to then return undef itself
in that case. Further, to modify submitedit to detect an "undef"
return from lockpr and then to call &$err_sub with $gnats::FULL_ERRSTR
to print the server error to the user.
I am sure my quick hack is not the best approach to this problem,
so I am sending merely this explanation in hopes that Gerald or
someone else can generate a better fix.
thanks,
~!paul
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnatsweb 2.7beta ignoring some server errors + fix,
G. Paul Ziemba <=