Mesa (master): wayland: Use wl_resource_* error functions

Kristian Høgsberg krh at kemper.freedesktop.org
Thu Sep 1 13:54:22 UTC 2011


Module: Mesa
Branch: master
Commit: 64332917c972a075c9e7792d77d8ef5ac2fd5a90
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=64332917c972a075c9e7792d77d8ef5ac2fd5a90

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Thu Sep  1 09:54:10 2011 -0400

wayland: Use wl_resource_* error functions

---

 src/egl/wayland/wayland-drm/wayland-drm.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index 443744c..82ca6aa 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -95,15 +95,15 @@ drm_create_buffer(struct wl_client *client, struct wl_resource *resource,
 	case WL_DRM_FORMAT_XRGB32:
 		break;
 	default:
-		wl_client_post_error(client, &resource->object,
-                                     WL_DRM_ERROR_INVALID_FORMAT,
-                                     "invalid format");
+		wl_resource_post_error(resource,
+				       WL_DRM_ERROR_INVALID_FORMAT,
+				       "invalid format");
 		return;
 	}
 
 	buffer = calloc(1, sizeof *buffer);
 	if (buffer == NULL) {
-		wl_client_post_no_memory(resource->client);
+		wl_resource_post_no_memory(resource);
 		return;
 	}
 
@@ -118,9 +118,9 @@ drm_create_buffer(struct wl_client *client, struct wl_resource *resource,
 						 stride, format);
 
 	if (buffer->driver_buffer == NULL) {
-		wl_client_post_error(client, &resource->object,
-                                     WL_DRM_ERROR_INVALID_NAME,
-                                     "invalid name");
+		wl_resource_post_error(resource,
+				       WL_DRM_ERROR_INVALID_NAME,
+				       "invalid name");
 		return;
 	}
 
@@ -143,9 +143,9 @@ drm_authenticate(struct wl_client *client,
 	struct wl_drm *drm = resource->data;
 
 	if (drm->callbacks->authenticate(drm->user_data, id) < 0)
-		wl_client_post_error(client, &resource->object,
-                                     WL_DRM_ERROR_AUTHENTICATE_FAIL,
-                                     "authenicate failed");
+		wl_resource_post_error(resource,
+				       WL_DRM_ERROR_AUTHENTICATE_FAIL,
+				       "authenicate failed");
 	else
 		wl_resource_post_event(resource, WL_DRM_AUTHENTICATED);
 }




More information about the mesa-commit mailing list