[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bluetooth-dev] Bad XML problems



Hi,

I have major problems with the OpenBT stack when I am running at the etrax 100 devboard. The problem occurs  when I am creating a sdp connection and asking the OpenBT stack for services. The same situation but with a PC running the OpenBT stack works just fine. I have the same version of the OpenBT stack on the devboard as on the PC but the sdp server segmentation faults when processing the sdp request.

The following list includes the function calls to where the sdp server faults:

*process_service_search_req
*handle_query
*handle_service_search_request
*get_all_rec_hdl
*get_record_handle
*get_from_xml
*start_xml_parser
*XML_ParseBuffer (I have printed the buffer here and it look ok)
*PrologInitProcessor
*ProcessXmlDecl
*doParseXmlDecl
*parseXmlDecl

In parseXmlDecl the sdp server segmentation faults at the line with arrows below:



 for (;;)
  {
         syslog(4,",");
        
        <------- Segmentation fault second round on the line below ------------>

    c = toAscii(enc, ptr, end);
         syslog(4,".");
    if (c == -1) {
         syslog(4,"1");
      *nextTokPtr = ptr;
      return 0;
    }
         syslog(4,"2");
    if (c == '=')
         {
           syslog(4,"5");
      break;
         }
    if (isSpace(c))
         {
                syslog(4,"Före while satsen 2\n");
      do {
                        ptr += enc->minBytesPerChar;
      } while (isSpace(c = toAscii(enc, ptr, end)));
                syslog(4,"Efter while satsen 2\n");
      if (c != '=') {
                        *nextTokPtr = ptr;
                        return 0;
      }
      break;
    }
         syslog(4,"56");
    ptr += enc->minBytesPerChar;
         syslog(4,"57");
  }

I use the standard sdp.xml file downloaded from the CVS. The OpenBT stack is downloaded yesterday from the CVS.

Summary:
It should not be the openbt stack - it works on the PC.
It should not be the xml parser - it works on the PC.
It should not be the xml file - it works on the PC.
So what the .... can it be?

If anyone can help me with this problem I would be very(VERY) grateful.

Regards,
Peter