[evolution-data-server/openismus-work-pohly: 1/2] data_book_convert_to_client_error: add E_DATA_BOOK_STATUS_BUSY



commit 62fd3b55564d412874e3ca2fcd300ddfd39c4dbc
Author: Patrick Ohly <patrick ohly intel com>
Date:   Tue Apr 2 06:38:15 2013 -0700

    data_book_convert_to_client_error: add E_DATA_BOOK_STATUS_BUSY
    
    This maps to E_CLIENT_ERROR_BUSY.
    
    This error was encountered in evolution-addressbook-factory
    when multiple clients open the same address book at the same
    time. The missing error mapping was not causing problems,
    because D-Bus error mapping elsewhere handled it and ensured
    that the EBookClient got the right code. The only downside
    was triggering the "code should not be reached" warning in the
    default case.
    
    Adding the error is more important for DRA. However, in that
    case it is uncertain whether this error can occur - better add it
    anyway.

 addressbook/libedata-book/e-data-book.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/libedata-book/e-data-book.c b/addressbook/libedata-book/e-data-book.c
index ecc7363..667af14 100644
--- a/addressbook/libedata-book/e-data-book.c
+++ b/addressbook/libedata-book/e-data-book.c
@@ -278,6 +278,11 @@ data_book_convert_to_client_error (GError *error)
                        error->code = E_CLIENT_ERROR_NOT_SUPPORTED;
                        break;
 
+               case E_DATA_BOOK_STATUS_BUSY:
+                       error->domain = E_CLIENT_ERROR;
+                       error->code = E_CLIENT_ERROR_BUSY;
+                       break;
+
                case E_DATA_BOOK_STATUS_NOT_OPENED:
                        error->domain = E_CLIENT_ERROR;
                        error->code = E_CLIENT_ERROR_NOT_OPENED;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]