Hi Jens, On 05/16/2012 04:03 PM, Jens Rehsack wrote:
From: Jens Rehsack<[email protected]>--- src/wsputil.c | 6 ++++++ 1 Datei geändert, 6 Zeilen hinzugefügt(+) diff --git a/src/wsputil.c b/src/wsputil.c index 1b2b2b7..c4c9d62 100644 --- a/src/wsputil.c +++ b/src/wsputil.c @@ -496,6 +496,12 @@ gboolean wsp_decode_application_id(struct wsp_header_iter *iter, */ if (wsp_header_iter_get_val_type(iter) == WSP_VALUE_TYPE_SHORT) { val = *pdu_val& 0x7f; + } else if (wsp_header_iter_get_val_type(iter) == WSP_VALUE_TYPE_TEXT) { + val_len = wsp_header_iter_get_val_len(iter); + val = -1; + + if (out_value) + *out_value = pdu_val; } else { val_len = wsp_header_iter_get_val_len(iter);
Unless I miss something, if the application_id is given as TEXT (in the pdu) the *out_value will always be NULL (it will be set to the result of get_text_entry()).
I think you don't need to set val_len and val, you can just return TRUE after doing *out_value = pdu_val.
Best regards, Ronald _______________________________________________ ofono mailing list [email protected] http://lists.ofono.org/listinfo/ofono
