[RFC]: bearer indication and well known values

[email protected] (Bruno Rodrigues)
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Hello.

I have a patch to fix two bugs with SonyEricsson T610 but although it
seems right to me, there's still something that doesn't smell right:

This is a snippet of device request:
data: 43 2d 31 2e 30 00 b3 80 b2 81 b2 82 89 45 6e 63   C-1.0........Enc
data: 6f 64 69 6e 67 2d 56 65 72 73 69 6f 6e 00 45 6e   oding-Version.En
data: 63 6f 64 69 6e 67 2d 56 65 72 73 69 6f 6e 00 31   coding-Version.1
data: 2e 33 00 .3.

this decodes to:
43...00 - end of user-agent
b3 80 - b3 is 80 + 33 - Bearer-Indication (see 1)
b2 81 - b2 is 80 + 32 - Accept-Application (see 1)
b2 82 - same 
89 45...00 - 89 is 80 + 09 - Connection (see 2)
45...00 31..00 - Text header, Encoding-Version, text value 1.3


1. Bearer-Indication and Accept-Indication are defined with well-known
values, instead of value data. To fix that, I've done the patch above
and I'll commit it unless someone complains.


2. This is not right. This decodes as "Connection: Encoding-Version"
and here's my request for comments - do you think that device has a bug
or is this somehow related with last three headers (bearer-indication
and application-id) ?
If you think that kannel is right, I'll just fill a new bug to
SonyEricsson ;)




Index: wap/wsp_headers.c
===================================================================
RCS file: /home/cvs/gateway/wap/wsp_headers.c,v
retrieving revision 1.7
diff -u -3 -p -r1.7 wsp_headers.c
--- wap/wsp_headers.c   19 Jun 2003 11:49:12 -0000      1.7
+++ wap/wsp_headers.c   13 Jul 2003 23:10:46 -0000
@@ -1063,6 +1063,18 @@ static void unpack_well_known_field(List
             octstr_append_decimal(decoded, val);
             break;
 
+        case WSP_HEADER_BEARER_INDICATION:
+            ch = wsp_bearer_indication_to_cstr(val);
+            if (!ch)
+                warning(0, "Unknown Bearer-Indication field name
0x%02x.", val);
+            break;
+
+        case WSP_HEADER_ACCEPT_APPLICATION:
+            ch = wsp_application_id_to_cstr(val);
+            if (!ch)
+                warning(0, "Unknown Accept-Application field name
0x%02x.", val);
+            break;
+
         default:
             if (headername) {
                 warning(0, "Did not expect short-integer with "
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.