gobex: Use ENOSYS to correspond to OBEX not implemented

ENOSYS correspond to function not implemented which is exactly what the
OBEX error code means.

Also since EINVAL means invalid argument that now map to OBEX bad request
This commit is contained in:
Luiz Augusto von Dentz 2012-02-18 17:18:59 +02:00 committed by Marcel Holtmann
parent faac92a4cb
commit 75e50f781b

View File

@ -1482,11 +1482,12 @@ guint8 g_obex_errno_to_rsp(int err)
return G_OBEX_RSP_FORBIDDEN;
case -ENOENT:
return G_OBEX_RSP_NOT_FOUND;
case -EINVAL:
case -EBADR:
return G_OBEX_RSP_BAD_REQUEST;
case -EFAULT:
return G_OBEX_RSP_SERVICE_UNAVAILABLE;
case -EINVAL:
case -ENOSYS:
return G_OBEX_RSP_NOT_IMPLEMENTED;
case -ENOTEMPTY:
case -EEXIST: