kdbus: make error messages more consistent with glib 99/132199/2 accepted/tizen/unified/20170608.072404 submit/tizen/20170607.081757
authorAdrian Szyndela <adrian.s@samsung.com>
Thu, 1 Jun 2017 11:41:09 +0000 (13:41 +0200)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Fri, 2 Jun 2017 06:39:23 +0000 (06:39 +0000)
Change-Id: Iccb88417fc83290ed70a32e86bc80c4a5c44c6ee

dbus/dbus-transport-kdbus.c

index ba03f04..b4cc0e1 100755 (executable)
@@ -558,15 +558,6 @@ send_message (DBusTransportKdbus *transport,
         {
           case ENXIO: /* no such id on the bus */
           case ESRCH:
-            dbus_set_error (error,
-                            DBUS_ERROR_NAME_HAS_NO_OWNER,
-                            "Name \"%s\" does not exist",
-                            destination);
-            break;
-
-          case EADDRNOTAVAIL:
-          case ECONNRESET:
-            /* when well known name is not available on the bus */
             if (is_auto_start)
                 dbus_set_error (error,
                                 DBUS_ERROR_SERVICE_UNKNOWN,
@@ -579,23 +570,46 @@ send_message (DBusTransportKdbus *transport,
                                 destination);
             break;
 
-          case EMLINK:
+          case EADDRNOTAVAIL:
+            dbus_set_error (error,
+                            DBUS_ERROR_SERVICE_UNKNOWN,
+                            "No support for activation for name: \"%s\"", destination);
+            break;
+
+          case EXFULL:
             dbus_set_error (error,
                             DBUS_ERROR_LIMITS_EXCEEDED,
-                            "The maximum number of pending replies per connection has been reached");
+                            "The memory pool of the receiver is full");
             break;
 
           case ENOBUFS:
-          case EXFULL:
             dbus_set_error (error,
                             DBUS_ERROR_LIMITS_EXCEEDED,
-                            "No space in receiver's buffer");
+                            "Too many pending messages on the receiver side");
+            break;
+
+          case EMSGSIZE:
+            dbus_set_error (error,
+                            DBUS_ERROR_LIMITS_EXCEEDED,
+                            "The size of the message is excessive");
+            break;
+
+          case EMLINK:
+            dbus_set_error (error,
+                            DBUS_ERROR_LIMITS_EXCEEDED,
+                            "The maximum number of pending replies per connection has been reached");
             break;
 
           case ETIMEDOUT:
             dbus_set_error (error,
                             DBUS_ERROR_TIMEOUT,
-                            "Connection does not receive a reply");
+                            "Timeout was reached");
+            break;
+
+          case EPERM:
+            dbus_set_error (error,
+                            DBUS_ERROR_ACCESS_DENIED,
+                            "Permission denied");
             break;
 
           default: