debuggers.hg
changeset 14683:a9dc65d34b14
Fix bad behaviour of xm when calling event.next(), by adding a different error
code (SESSION_NOT_REGISTERED).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
code (SESSION_NOT_REGISTERED).
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author | Ewan Mellor <ewan@xensource.com> |
---|---|
date | Thu Mar 29 16:18:39 2007 +0100 (2007-03-29) |
parents | dd844ac0c289 |
children | 2e05921d4f78 121a97005d11 |
files | docs/xen-api/xenapi-datamodel.tex tools/python/xen/xend/XendAPI.py tools/python/xen/xm/messages/en/xen-xm.po |
line diff
1.1 --- a/docs/xen-api/xenapi-datamodel.tex Thu Mar 29 15:51:04 2007 +0100 1.2 +++ b/docs/xen-api/xenapi-datamodel.tex Thu Mar 29 16:18:39 2007 +0100 1.3 @@ -1131,8 +1131,10 @@ Blocking call which returns a (possibly 1.4 1.5 the batch of events 1.6 \vspace{0.3cm} 1.7 -\vspace{0.3cm} 1.8 -\vspace{0.3cm} 1.9 + 1.10 +\noindent{\bf Possible Error Codes:} {\tt SESSION\_NOT\_REGISTERED} 1.11 + 1.12 +\vspace{0.6cm} 1.13 1.14 \vspace{1cm} 1.15 \newpage 1.16 @@ -13836,6 +13838,17 @@ current connection. The handle paramete 1.17 \begin{verbatim}SESSION_INVALID(handle)\end{verbatim} 1.18 \begin{center}\rule{10em}{0.1pt}\end{center} 1.19 1.20 +\subsubsection{SESSION\_NOT\_REGISTERED} 1.21 + 1.22 +This session is not registered to receive events. You must call 1.23 +event.register before event.next. The session handle you are using is 1.24 +echoed. 1.25 + 1.26 +\vspace{0.3cm} 1.27 +{\bf Signature:} 1.28 +\begin{verbatim}SESSION_NOT_REGISTERED(handle)\end{verbatim} 1.29 +\begin{center}\rule{10em}{0.1pt}\end{center} 1.30 + 1.31 \subsubsection{VALUE\_NOT\_SUPPORTED} 1.32 1.33 You attempted to set a value that is not supported by this implementation.
2.1 --- a/tools/python/xen/xend/XendAPI.py Thu Mar 29 15:51:04 2007 +0100 2.2 +++ b/tools/python/xen/xend/XendAPI.py Thu Mar 29 16:18:39 2007 +0100 2.3 @@ -122,7 +122,7 @@ def event_unregister(session, unreg_clas 2.4 2.5 def event_next(session): 2.6 if session not in event_registrations: 2.7 - return xen_api_error(['SESSION_INVALID', session]) 2.8 + return xen_api_error(['SESSION_NOT_REGISTERED', session]) 2.9 queue = event_registrations[session]['queue'] 2.10 events = [queue.get()] 2.11 try:
3.1 --- a/tools/python/xen/xm/messages/en/xen-xm.po Thu Mar 29 15:51:04 2007 +0100 3.2 +++ b/tools/python/xen/xm/messages/en/xen-xm.po Thu Mar 29 16:18:39 2007 +0100 3.3 @@ -19,7 +19,7 @@ 3.4 msgid "" 3.5 msgstr "" 3.6 "Project-Id-Version: Xen-xm 3.0\n" 3.7 -"PO-Revision-Date: 2007-03-10 23:17+0000\n" 3.8 +"PO-Revision-Date: 2007-03-29 16:13+0100\n" 3.9 "Last-Translator: Ewan Mellor <ewan@xensource.com>\n" 3.10 "Language-Team: xen-devel <xen-devel@lists.xensource.com>\n" 3.11 "MIME-Version: 1.0\n" 3.12 @@ -64,3 +64,6 @@ msgstr "The VM must be %(2)s to perform 3.13 3.14 msgid "VM_HVM_REQUIRED" 3.15 msgstr "HVM guest support is unavailable: is VT/AMD-V supported by your CPU and enabled in your BIOS?" 3.16 + 3.17 +msgid "SESSION_NOT_REGISTERED" 3.18 +msgstr "This session is not registered to receive events. You must call event.register before event.next. (Session handle is %(1)s.)"