From: SourceForge.net <no...@so...> - 2009-11-09 21:42:55
|
Bugs item #2561038, was opened at 2009-02-03 08:02 Message generated for change (Settings changed) made by ricwhite You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=2561038&group_id=71730 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: HPI Shell >Group: 2.14.1 Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Anton Pak (avpak) Assigned to: Anton Pak (avpak) Summary: Incorrect displaying of Text Buffers Initial Comment: File: hpi_shell/service.c Function: get_text_buffer_text Seems this function does not process correctly BCD+ and ASCII6 texts. SaHpi.h says: Note 2: The SAHPI_TL_TYPE_BCDPLUS and SAHPI_TL_TYPE_ASCII6 encodings use normal ASCII character encodings, but restrict the allowed characters to a subset of the entire ASCII character set. These encodings are used when the target device contains restrictions on which characters it can store or display. SAHPI_TL_TYPE_BCDPLUS data may be stored externally as 4-bit values, and SAHPI_TL_TYPE_ASCII6 may be stored externally as 6-bit values. But, regardless of how the data is stored externally, it is encoded as 8-bit ASCII in the SaHpiTextBufferT structure passed across the HPI. So these types are just ASCII8 and we don't have to decode them. I suspect that function set_text_buffer in file hpi_shell/ctrl_inv.c has the same issue. The patch is attached. ---------------------------------------------------------------------- Comment By: Anton Pak (avpak) Date: 2009-06-01 11:46 Message: Fixed in trunk (rev. #7008) ---------------------------------------------------------------------- Comment By: Ric White (ricwhite) Date: 2009-05-29 15:28 Message: Hi Anton, I agree with the interpretation you posted on Openhpi-devel on Feb 05 2009: >So, hpi_shell as HPI user application shall not pack/unpack BCD+/ASCII6 >data from/to SaHpiBufferT. The data shall be already presented as ASCII8. In looking through the source, I've found code that also supports this interpretation. The best example would probably be oh_valid_textbuffer() in utils/sahpi_struct_utils.c, along with the code in utils/t/sahpi/sahpi_text_utils_test.c that test oh_valid_textbuffer(). In both places, text buffers with DataType SAHPI_TL_TYPE_BCDPLUS, and SAHPI_TL_TYPE_ASCII6 are treated as actually containing a restricted set of ASCII8 characters. So in my opinion, the changes in your bcd_ascii6.patch are indeed necessary. Also, I agree with you that set_text_buffer() in file hpi_shell/ctrl_inv.c has the same issue. Best Regards, Ric ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=532251&aid=2561038&group_id=71730 |