Changeset 162
- Timestamp:
- 05/06/06 17:29:28 (3 years ago)
- Files:
-
- branches/dev-branch/devices.txt (modified) (1 diff)
- branches/dev-branch/libsyncml/parser/sml_xml_assm.c (modified) (2 diffs)
- branches/dev-branch/libsyncml/parser/sml_xml_parse.c (modified) (5 diffs)
- branches/dev-branch/tools/syncml-obex-client.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/dev-branch/devices.txt
r161 r162 67 67 68 68 Supported: Unknown 69 70 ======================================== 71 Man: Nokia 72 Mod: Nokia 6230 73 FirmwareVersion: V 05.50 74 SoftwareVersion: V 05.50 75 HardwareVersion: 0606 76 77 ReceiveLimit: 0 78 MaxObjSize: 0 79 AllowLateStatus: no 80 NoPendingReplies: no 81 Connection used: Obex 82 Identifier: PC Suite 83 Contact DB: vcard 84 Event DB: (null) 85 Todo DB: (null) 86 Note DB: (null) 87 88 Bluetooth: Yes 89 Wbxml: Yes 90 SyncML Version: 1.1 91 SupportsNumberofChanges: No 92 SupportsLargeObjects: No branches/dev-branch/libsyncml/parser/sml_xml_assm.c
r160 r162 448 448 goto error; 449 449 450 if (assm->session->supportsNumberOfChanges && assm->session->version != SML_VERSION_10) {450 /*if (assm->session->supportsNumberOfChanges && assm->session->version != SML_VERSION_10) { 451 451 if (!_smlXmlAssemblerAddID(assm, SML_ELEMENT_NUMBEROFCHANGES, cmd->private.sync.numChanged, error)) 452 452 goto error; 453 } 453 }*/ 454 454 455 455 smlTrace(TRACE_EXIT, "%s", __func__); … … 1102 1102 goto error; 1103 1103 1104 if (status->type != SML_COMMAND_TYPE_RESULTS) { 1105 const char *cmdname = smlCommandTypeToString(status->type, error); 1106 if (!cmdname) 1107 goto error; 1108 1109 if (!_smlXmlAssemblerAddString(assm, SML_ELEMENT_CMD, cmdname, error)) 1110 goto error; 1111 } 1104 const char *cmdname = smlCommandTypeToString(status->type, error); 1105 if (!cmdname) 1106 goto error; 1107 1108 if (!_smlXmlAssemblerAddString(assm, SML_ELEMENT_CMD, cmdname, error)) 1109 goto error; 1112 1110 1113 1111 switch (status->type) { branches/dev-branch/libsyncml/parser/sml_xml_parse.c
r160 r162 583 583 goto error_free_item; 584 584 break; 585 case SML_COMMAND_TYPE_RESULTS: 585 586 case SML_COMMAND_TYPE_PUT:; 586 587 /* Some phones send the type information for the devinf put … … 1924 1925 smlAssert(element); 1925 1926 smlAssert(cttype); 1926 1927 1928 if (!_smlXmlParserStep(parser)) { 1929 smlErrorSet(error, SML_ERROR_GENERIC, "Missing nodes"); 1930 goto error; 1931 } 1932 1927 1933 while (1) { 1928 if (!_smlXmlParserStep(parser)) {1929 smlErrorSet(error, SML_ERROR_GENERIC, "Missing nodes");1930 goto error;1931 }1932 1933 1934 if (!strcmp((char *)xmlTextReaderConstName(parser->reader), element) && \ 1934 1935 xmlTextReaderNodeType(parser->reader) == XML_NODE_CLOSE) { 1935 1936 break; 1936 1937 } else if (xmlTextReaderNodeType(parser->reader) != XML_NODE_START) { 1937 smlErrorSet(error, SML_ERROR_GENERIC, "Not a start node ");1938 smlErrorSet(error, SML_ERROR_GENERIC, "Not a start node: %s %i", (char *)xmlTextReaderConstName(parser->reader), xmlTextReaderNodeType(parser->reader)); 1938 1939 goto error; 1939 1940 } … … 1943 1944 goto error; 1944 1945 } else if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_VERCT)) { 1945 if (!_smlXmlParserGetString(parser, version, SML_ELEMENT_VERCT, error)) 1946 /* Some phones send an empty VerCT for formats that dont have a version 1947 * (like notes). */ 1948 if (!_smlXmlParserStep(parser)) { 1949 smlErrorSet(error, SML_ERROR_GENERIC, "No node at all"); 1946 1950 goto error; 1951 } 1952 1953 if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_VERCT) && \ 1954 xmlTextReaderNodeType(parser->reader) == XML_NODE_CLOSE) { 1955 *version = g_strdup(""); 1956 } else if (xmlTextReaderNodeType(parser->reader) == XML_NODE_TEXT) { 1957 *version = g_strstrip(g_strdup((char *)xmlTextReaderConstValue(parser->reader))); 1958 1959 if (!_smlXmlParserExpectNode(parser, XML_NODE_CLOSE, FALSE, SML_ELEMENT_VERCT, error)) 1960 goto error; 1961 } else { 1962 *version = g_strdup(""); 1963 continue; 1964 } 1947 1965 } else { 1948 1966 smlErrorSet(error, SML_ERROR_GENERIC, "wrong initial node"); 1967 goto error; 1968 } 1969 1970 if (!_smlXmlParserStep(parser)) { 1971 smlErrorSet(error, SML_ERROR_GENERIC, "Missing nodes"); 1949 1972 goto error; 1950 1973 } … … 2088 2111 2089 2112 while (1) { 2113 if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_DEVINF) && \ 2114 xmlTextReaderNodeType(parser->reader) == XML_NODE_CLOSE) { 2115 break; 2116 } else if (xmlTextReaderNodeType(parser->reader) != XML_NODE_START) { 2117 smlErrorSet(error, SML_ERROR_GENERIC, "Not a start node"); 2118 goto error_free_devinf; 2119 } 2120 2121 2090 2122 if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_CTCAP)) { 2091 2123 /* Ignored for now */ 2124 smlTrace(TRACE_INTERNAL, "Skipping ctcap node"); 2092 2125 if (xmlTextReaderNext(parser->reader) != 1) { 2093 2126 smlErrorSet(error, SML_ERROR_GENERIC, "Unable to skip ctcap node"); 2094 2127 goto error; 2095 2128 } 2096 } 2097 2098 if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_DEVINF) && \ 2099 xmlTextReaderNodeType(parser->reader) == XML_NODE_CLOSE) { 2100 break; 2101 } else if (xmlTextReaderNodeType(parser->reader) != XML_NODE_START) { 2102 smlErrorSet(error, SML_ERROR_GENERIC, "Not a start node"); 2103 goto error_free_devinf; 2104 } 2105 2106 if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_VERDTD)) { 2129 continue; 2130 } else if (!strcmp((char *)xmlTextReaderConstName(parser->reader), SML_ELEMENT_VERDTD)) { 2107 2131 char *verdtd = NULL; 2108 2132 if (!_smlXmlParserGetString(parser, &verdtd, SML_ELEMENT_VERDTD, error)) … … 2214 2238 goto error_free_devinf; 2215 2239 } else { 2216 smlErrorSet(error, SML_ERROR_GENERIC, "wrong initial node ");2240 smlErrorSet(error, SML_ERROR_GENERIC, "wrong initial node: %s", (char *)xmlTextReaderConstName(parser->reader)); 2217 2241 goto error_free_devinf; 2218 2242 } branches/dev-branch/tools/syncml-obex-client.c
r160 r162 74 74 fprintf (stderr, "[--allowLateStatus]\t\t\tAllows that a phone can send commands before statuses (Needed for some phones)\n\n"); 75 75 fprintf (stderr, "[--noPendingReplies]\t\t\tRequire that no pending replies are allowed (Needed for some phones)\n\n"); 76 fprintf (stderr, "[--noStringTable]\t\t\tDont use wbxml string tables (Needed for some phones)\n\n"); 76 77 fprintf (stderr, "[--dumpinfo]\t\t\tPrint info about the phone at the end which can be sent to the developers\n"); 77 78 exit (ecode); … … 245 246 SmlBool noPending = FALSE; 246 247 SmlBool dumpinfo = FALSE; 248 SmlBool noStringTable = FALSE; 247 249 SmlProtocolVersion sessionVersion = SML_VERSION_UNKNOWN; 248 250 SmlDevInf *deviceDevinf = NULL; … … 280 282 if (noPending) 281 283 smlSessionSetNoPendingReplies(session, noPending); 284 285 if (noStringTable) 286 smlSessionUseStringTable(session, FALSE); 282 287 break; 283 288 case SML_MANAGER_SESSION_FINAL: … … 497 502 } else if (!strcmp (arg, "--noPendingReplies")) { 498 503 noPending = TRUE; 504 } else if (!strcmp (arg, "--noStringTable")) { 505 noStringTable = TRUE; 499 506 } else if (!strcmp (arg, "--version")) { 500 507 i++; … … 732 739 printf("HardwareVersion: %s\n", smlDevInfGetHardwareVersion(deviceDevinf)); 733 740 printf("\n"); 734 735 736 737 NeedsReceiveLimit: yes 738 AllowLateStatus: yes 739 NoPendingReplies: no 740 741 printf("ReceiveLimit: %i\n", recvLimit); 742 printf("MaxObjSize: %i\n", maxObjSize); 743 printf("AllowLateStatus: %s\n", lateStatus ? "yes" : "no"); 744 printf("NoPendingReplies: %s\n", noPending ? "yes" : "no"); 741 745 printf("Connection used: Obex\n"); 742 746 printf("Identifier: %s\n", identifier);
