Changeset 76 for pjproject/trunk/pjsip/src/pjsip/sip_parser.c
- Timestamp:
- Nov 22, 2005 1:06:33 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsip/sip_parser.c
r74 r76 759 759 } 760 760 761 msg = pjsip_msg_create(pool, PJSIP_REQUEST_MSG);762 763 761 /* Parse request or status line */ 764 762 if (pj_scan_stricmp( scanner, PJSIP_VERSION, 7) == 0) { 765 msg ->type = PJSIP_RESPONSE_MSG;763 msg = pjsip_msg_create(pool, PJSIP_RESPONSE_MSG); 766 764 int_parse_status_line( scanner, &msg->line.status ); 767 765 } else { 768 msg ->type = PJSIP_REQUEST_MSG;766 msg = pjsip_msg_create(pool, PJSIP_REQUEST_MSG); 769 767 int_parse_req_line(scanner, pool, &msg->line.req ); 770 768 } … … 859 857 860 858 /* If we have Content-Type header, treat the rest of the message as body.*/ 861 if (ctype_hdr ) {859 if (ctype_hdr && scanner->curptr!=scanner->end) { 862 860 pjsip_msg_body *body = pj_pool_alloc(pool, sizeof(pjsip_msg_body)); 863 861 pj_strdup(pool, &body->content_type.type, &ctype_hdr->media.type); … … 1380 1378 hdr->star = 0; 1381 1379 hdr->uri = int_parse_uri_or_name_addr(scanner, ctx->pool, 1382 PJSIP_PARSE_URI_AS_NAMEADDR); 1380 PJSIP_PARSE_URI_AS_NAMEADDR | 1381 PJSIP_PARSE_URI_IN_FROM_TO_HDR); 1383 1382 1384 1383 int_parse_contact_param(hdr, scanner, ctx->pool);
Note: See TracChangeset
for help on using the changeset viewer.