OSDN Git Service

Remove "authen" and "autho" short versions for ATT constants
authorClaudio Takahasi <claudio.takahasi@openbossa.org>
Tue, 29 Mar 2011 19:08:35 +0000 (16:08 -0300)
committerJohan Hedberg <johan.hedberg@nokia.com>
Wed, 30 Mar 2011 16:38:46 +0000 (19:38 +0300)
attrib/att.c
attrib/att.h
src/attrib-server.c

index 08000e0..972f8bf 100644 (file)
@@ -44,13 +44,13 @@ const char *att_ecode2str(uint8_t status)
                return "Attribute can't be written";
        case ATT_ECODE_INVALID_PDU:
                return "Attribute PDU was invalid";
-       case ATT_ECODE_INSUFF_AUTHEN:
+       case ATT_ECODE_AUTHENTICATION:
                return "Attribute requires authentication before read/write";
        case ATT_ECODE_REQ_NOT_SUPP:
                return "Server doesn't support the request received";
        case ATT_ECODE_INVALID_OFFSET:
                return "Offset past the end of the attribute";
-       case ATT_ECODE_INSUFF_AUTHO:
+       case ATT_ECODE_AUTHORIZATION:
                return "Attribute requires authorization before read/write";
        case ATT_ECODE_PREP_QUEUE_FULL:
                return "Too many prepare writes have been queued";
index 7a83bfa..93b58dc 100644 (file)
 #define ATT_ECODE_READ_NOT_PERM                        0x02
 #define ATT_ECODE_WRITE_NOT_PERM               0x03
 #define ATT_ECODE_INVALID_PDU                  0x04
-#define ATT_ECODE_INSUFF_AUTHEN                        0x05
+#define ATT_ECODE_AUTHENTICATION               0x05
 #define ATT_ECODE_REQ_NOT_SUPP                 0x06
 #define ATT_ECODE_INVALID_OFFSET               0x07
-#define ATT_ECODE_INSUFF_AUTHO                 0x08
+#define ATT_ECODE_AUTHORIZATION                        0x08
 #define ATT_ECODE_PREP_QUEUE_FULL              0x09
 #define ATT_ECODE_ATTR_NOT_FOUND               0x0A
 #define ATT_ECODE_ATTR_NOT_LONG                        0x0B
index f4bf4b8..2e95628 100644 (file)
@@ -172,9 +172,9 @@ static uint8_t att_check_reqs(struct gatt_channel *channel, uint8_t opcode,
        if (!channel->encrypted)
                channel->encrypted = g_attrib_is_encrypted(channel->attrib);
        if (reqs == ATT_AUTHENTICATION && !channel->encrypted)
-               return ATT_ECODE_INSUFF_AUTHEN;
+               return ATT_ECODE_AUTHENTICATION;
        else if (reqs == ATT_AUTHORIZATION)
-               return ATT_ECODE_INSUFF_AUTHO;
+               return ATT_ECODE_AUTHORIZATION;
 
        switch (opcode) {
        case ATT_OP_READ_BY_GROUP_REQ: