hex to binary conversion for xml post
Emanuele Carbone <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi guys,
i tried to send a simple sms with this text "12345" (without quotes). The
request was done in XML POST and i have received a strange sequence of
character. But if the same request is done in GET i receive the correct
message. Smsbox when received a xml request extract the text so:
/* text */
text = NULL;
get_tag(*body, octstr_imm("ud"), &tmp, 0, 0);
if(tmp) {
O_DESTROY(text);
text = octstr_duplicate(tmp);
if(octstr_hex_to_binary(text) == -1)
octstr_url_decode(text);
O_DESTROY(tmp);
}
with the text 12345: (but it is true for the all hex symbols)
octstr_check_range(ostr, 0, ostr->len, gw_isxdigit) is valid
and the function convert ascii data to binary values. This action compromise
my text.
I don't understand why for xml request smsbox do this check.
Please, can anyone explain the reason?!
thanks in advance