Author: rhs
Date: Tue Mar 13 02:10:58 2012
New Revision: 1299953

URL: http://svn.apache.org/viewvc?rev=1299953&view=rev
Log:
added support for smalluint and smallulong encodings

Modified:
    qpid/proton/proton-c/src/codec/codec.c

Modified: qpid/proton/proton-c/src/codec/codec.c
URL: 
http://svn.apache.org/viewvc/qpid/proton/proton-c/src/codec/codec.c?rev=1299953&r1=1299952&r2=1299953&view=diff
==============================================================================
--- qpid/proton/proton-c/src/codec/codec.c (original)
+++ qpid/proton/proton-c/src/codec/codec.c Tue Mar 13 02:10:58 2012
@@ -275,6 +275,10 @@ ssize_t pn_read_encoding(char *bytes, si
   case PNE_UINT0:
     cb->on_uint(ctx, 0);
     return offset;
+  case PNE_SMALLUINT:
+    cb->on_uint(ctx, *((uint8_t *) (bytes + offset)));
+    offset += 1;
+    return offset;
   case PNE_INT:
     cb->on_int(ctx, ntohl(*((uint32_t *) (bytes + offset))));
     offset += 4;
@@ -316,6 +320,10 @@ ssize_t pn_read_encoding(char *bytes, si
   case PNE_ULONG0:
     cb->on_ulong(ctx, 0);
     return offset;
+  case PNE_SMALLULONG:
+    cb->on_ulong(ctx, *((uint8_t *) (bytes + offset)));
+    offset += 1;
+    return offset;
   case PNE_VBIN8:
   case PNE_STR8_UTF8:
   case PNE_SYM8:



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to