Changeset 145 for pjproject/trunk
- Timestamp:
- Feb 7, 2006 8:56:50 PM (19 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 4 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/build
- Property svn:ignore
-
old new 3 3 *.plg 4 4 TODO-LIST.TXT 5 .pj* 6 *.swp
-
- Property svn:ignore
-
pjproject/trunk/pjsip/build/Makefile
r65 r145 1 include make-$(TARGET).inc1 include ../../build/common.mak 2 2 3 RULES_MAK := ../../build/rules.mak 4 5 PJLIB_LIB:=../../pjlib/lib/libpj-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT) 6 PJLIB_UTIL_LIB:=../../pjlib-util/lib/libpjlib-util-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT) 7 PJMEDIA_LIB:=../../pjmedia/lib/libpjmedia-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT) 8 9 export PJSIP_LIB:=../lib/libpjsip-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT) 10 export PJSIP_UA_LIB:=../lib/libpjsip-ua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(LIBEXT) 11 12 13 ############################################################################### 14 # Gather all flags. 15 # 16 export _CFLAGS := -O2 -g $(CC_CFLAGS) $(OS_CFLAGS) $(HOST_CFLAGS) $(M_CFLAGS) \ 17 $(CFLAGS) $(CC_INC)../include $(CC_INC)../../pjlib/include \ 18 $(CC_INC)../../pjlib-util/include $(CC_INC)../../pjmedia/include 19 export _CXXFLAGS:= $(_CFLAGS) $(CC_CXXFLAGS) $(OS_CXXFLAGS) $(M_CXXFLAGS) \ 20 $(HOST_CXXFLAGS) $(CXXFLAGS) 21 export _LDFLAGS := $(subst /,$(HOST_PSEP),$(PJSIP_UA_LIB)) \ 22 $(subst /,$(HOST_PSEP),$(PJSIP_LIB)) \ 23 $(subst /,$(HOST_PSEP),$(PJMEDIA_LIB)) \ 24 $(subst /,$(HOST_PSEP),$(PJLIB_UTIL_LIB)) \ 25 $(subst /,$(HOST_PSEP),$(PJLIB_LIB)) \ 26 $(CC_LDFLAGS) $(OS_LDFLAGS) $(M_LDFLAGS) $(HOST_LDFLAGS) \ 27 $(LDFLAGS) 28 29 30 ############################################################################### 31 # Defines for building PJSIP core library 32 # 3 33 export PJSIP_SRCDIR = ../src/pjsip 4 export PJSIP_SRCEXT = .c 5 export PJSIP_SRCS = $(PJSIP_SOURCES) sip_auth.c sip_auth_msg.c sip_auth_parser.c \ 6 sip_endpoint.c sip_misc.c sip_msg.c sip_parser.c \ 7 sip_resolve.c sip_transaction.c sip_transport.c sip_uri.c 34 export PJSIP_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ 35 sip_errno.o sip_msg.o sip_parser.o sip_tel_uri.o sip_uri.o \ 36 sip_endpoint.o sip_util.o sip_util_proxy.o \ 37 sip_resolve.o sip_transport.o sip_transport_loop.o sip_transport_udp.o \ 38 sip_auth_client.o sip_auth_msg.o sip_auth_parser.o sip_auth_server.o \ 39 sip_transaction.o sip_util_statefull.o \ 40 sip_dialog.o sip_ua_layer.o 41 export PJSIP_CFLAGS += $(_CFLAGS) 8 42 9 export PJSIP_UA_SRCDIR = ../src/pjsip_mod_ua 10 export PJSIP_UA_SRCEXT = .c 11 export PJSIP_UA_SRCS = $(PJSIP_UA_SOURCES) sip_dialog.c sip_reg.c sip_ua.c 43 ############################################################################### 44 # Defines for building PJSIP UA library 45 # 46 export PJSIP_UA_SRCDIR = ../src/pjsip-ua 47 export PJSIP_UA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ 48 sip_inv.o sip_reg.o 49 export PJSIP_UA_CFLAGS += $(_CFLAGS) 12 50 13 export PJSIP_SIMPLE_SRCDIR = ../src/pjsip_simple14 export PJSIP_SIMPLE_SRCEXT = .c15 export PJSIP_SIMPLE_SRCS = $(PJSIP_SIMPLE_SOURCES) event_notify.c event_notify_msg.c \16 messaging.c pidf.c presence.c xpidf.c17 51 52 ############################################################################### 53 # Defines for building PJSUA 54 # 18 55 export PJSUA_SRCDIR = ../src/pjsua 19 export PJSUA_SRCEXT = .c 20 export PJSUA_SRCS = $(PJSUA_SOURCES) main.c getopt.c 56 export PJSUA_OBJS += $(OS_OBJS) $(M_OBJS) $(CC_OBJS) $(HOST_OBJS) \ 57 main.o pjsua_reg.o pjsua.o 58 export PJSUA_CFLAGS += $(_CFLAGS) 59 export PJSUA_LDFLAGS += $(_LDFLAGS) 60 export PJSUA_EXE:=../bin/pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME)$(HOST_EXE) 21 61 22 export TARGET CCOUT CC AR RANLIB MV RM RMDIR MKDIR OBJEXT LD LDOUT23 62 24 all: pjsip pjsip_ua pjsip_simple pjsua 63 64 export CC_OUT CC AR RANLIB HOST_MV HOST_RM HOST_RMDIR HOST_MKDIR OBJEXT LD LDOUT 65 ############################################################################### 66 # Main entry 67 # 68 # 69 TARGETS := pjsip pjsip-ua pjsua 70 71 all: $(TARGETS) 25 72 26 73 doc: 27 74 cd .. && doxygen docs/doxygen.cfg 28 75 29 print: 30 $(MAKE) -f make-rules APP=PJSIP app=pjsip print_lib 31 $(MAKE) -f make-rules APP=PJSIP_UA app=pjsip_ua print_lib 32 $(MAKE) -f make-rules APP=PJSIP_SIMPLE app=pjsip_simple print_lib 33 $(MAKE) -f make-rules APP=PJSUA app=pjsua print_bin 34 35 depend: 36 $(MAKE) -f make-rules APP=PJSIP app=pjsip depend 37 $(MAKE) -f make-rules APP=PJSUA app=pjsua depend 38 $(MAKE) -f make-rules APP=PJSIP_UA app=pjsip_ua depend 39 $(MAKE) -f make-rules APP=PJSIP_SIMPLE app=pjsip_simple depend 40 echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB)' >> .pjsua.depend 76 dep: depend 77 distclean: realclean 41 78 42 dep: depend 79 .PHONY: dep depend pjsip pjsip-ua pjsua clean realclean distclean 43 80 44 81 pjsip: 45 $(MAKE) -f make-rulesAPP=PJSIP app=pjsip $(PJSIP_LIB)82 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $(PJSIP_LIB) 46 83 47 pjs ua:48 $(MAKE) -f make-rules APP=PJSUA app=pjsua $(PJSUA_EXE)84 pjsip-ua: 85 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $(PJSIP_UA_LIB) 49 86 50 pjs ip_ua:51 $(MAKE) -f make-rules APP=PJSIP_UA app=pjsip_ua $(PJSIP_UA_LIB)87 pjsua: $(PJSIP_LIB) $(PJSIP_UA_LIB) 88 $(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $(PJSUA_EXE) 52 89 53 pjsip_simple: 54 $(MAKE) -f make-rules APP=PJSIP_SIMPLE app=pjsip_simple $(PJSIP_SIMPLE_LIB) 90 .PHONY: ../lib/pjsip.ko 91 ../lib/pjsip.ko: 92 echo Making $@ 93 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@ 55 94 56 samples: 57 gcc $(_CFLAGS) -o ../bin/simpleua ../src/samples/simpleua.c $(_LDFLAGS) 95 .PHONY: ../lib/pjsip-ua.ko 96 ../lib/pjsip-ua.ko: 97 echo Making $@ 98 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@ 58 99 59 clean: 60 $(MAKE) -f make-rules APP=PJSIP app=pjsip clean 61 $(MAKE) -f make-rules APP=PJSUA app=pjsua clean 62 $(MAKE) -f make-rules APP=PJSIP_UA app=pjsip_ua clean 63 $(MAKE) -f make-rules APP=PJSIP_SIMPLE app=pjsip_simple clean 100 .PHONY: ../lib/pjsua.ko 101 ../lib/pjsua.ko: 102 $(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@ 64 103 65 realclean:66 $(MAKE) -f make-rules APP=PJSIP app=pjsip realclean67 $(MAKE) -f make-rules APP=PJSUA app=pjsua realclean68 $(MAKE) -f make-rules APP=PJSIP_UA app=pjsip_ua realclean69 $(MAKE) -f make-rules APP=PJSIP_SIMPLE app=pjsip_simple realclean70 71 distclean: realclean 104 clean depend realclean: 105 $(MAKE) -f $(RULES_MAK) APP=PJSIP app=pjsip $@ 106 $(MAKE) -f $(RULES_MAK) APP=PJSIP_UA app=pjsip-ua $@ 107 $(MAKE) -f $(RULES_MAK) APP=PJSUA app=pjsua $@ 108 @if test "$@" == "depend"; then \ 109 echo '$(PJSUA_EXE): $(PJSIP_LIB) $(PJSIP_UA_LIB)' >> .pjsua-$(MACHINE_NAME)-$(OS_NAME)-$(CC_NAME).depend; \ 110 fi 72 111 73 112 113 -
pjproject/trunk/pjsip/include/pjsip/sip_msg.h
r139 r145 73 73 * is recognized or not. 74 74 */ 75 typedefstruct pjsip_method75 struct pjsip_method 76 76 { 77 77 pjsip_method_e id; /**< Method ID, from \a pjsip_method_e. */ 78 78 pj_str_t name; /**< Method name, which will always contain the 79 79 method string. */ 80 } pjsip_method;80 }; 81 81 82 82 -
pjproject/trunk/pjsip/include/pjsip/sip_transport.h
r127 r145 467 467 * specific members. 468 468 */ 469 typedefstruct pjsip_transport469 struct pjsip_transport 470 470 { 471 471 char obj_name[PJ_MAX_OBJ_NAME]; /**< Name. */ … … 538 538 * Application may extend this structure.. 539 539 */ 540 } pjsip_transport;540 }; 541 541 542 542 -
pjproject/trunk/pjsip/src/pjsip-ua/sip_inv.c
r141 r145 847 847 /* Include SDP for 18x and 2xx response. */ 848 848 if (st_code/10 == 18 || st_code/10 == 20) { 849 pjmedia_sdp_session *local;849 const pjmedia_sdp_session *local; 850 850 851 851 status = pjmedia_sdp_neg_get_neg_local(inv->neg, &local); -
pjproject/trunk/pjsip/src/pjsip/sip_endpoint.c
r141 r145 123 123 124 124 /* Compare module name, used for searching module based on name. */ 125 static int cmp_mod_name(void *name, const pjsip_module*mod)126 { 127 return pj_stricmp(name, & mod->name);125 static int cmp_mod_name(void *name, const void *mod) 126 { 127 return pj_stricmp(name, &((pjsip_module*)mod)->name); 128 128 } 129 129 -
pjproject/trunk/pjsip/src/pjsip/sip_msg.c
r139 r145 1717 1717 text->slen + 2); /* text */ 1718 1718 hvalue.slen = pj_sprintf(hvalue.ptr, "%u %.*s \"%.*s\"", 1719 code, host->slen, host->ptr,1720 text->slen, text->ptr);1719 code, (int)host->slen, host->ptr, 1720 (int)text->slen, text->ptr); 1721 1721 1722 1722 return pjsip_generic_string_hdr_create(pool, &str_warning, &hvalue); -
pjproject/trunk/pjsip/src/pjsip/sip_parser.c
r127 r145 155 155 pj_pool_t *pool, 156 156 unsigned option); 157 static pjsip_sip_uri*int_parse_sip_url( pj_scanner *scanner,157 static void* int_parse_sip_url( pj_scanner *scanner, 158 158 pj_pool_t *pool, 159 159 pj_bool_t parse_params); … … 1150 1150 } 1151 1151 1152 /* Parse "sip:" and "sips:" URI. */ 1153 static pjsip_sip_uri *int_parse_sip_url( pj_scanner *scanner, 1154 pj_pool_t *pool, 1155 pj_bool_t parse_params) 1152 /* Parse "sip:" and "sips:" URI. 1153 * This actually returns (pjsip_sip_uri*) type, 1154 */ 1155 static void* int_parse_sip_url( pj_scanner *scanner, 1156 pj_pool_t *pool, 1157 pj_bool_t parse_params) 1156 1158 { 1157 1159 pj_str_t scheme; -
pjproject/trunk/pjsip/src/pjsip/sip_tel_uri.c
r127 r145 71 71 const pjsip_tel_uri *url1, const pjsip_tel_uri *url2); 72 72 static pjsip_tel_uri* tel_uri_clone(pj_pool_t *pool, const pjsip_tel_uri *rhs); 73 static pjsip_tel_uri *tel_uri_parse( pj_scanner *scanner, pj_pool_t *pool,73 static void* tel_uri_parse( pj_scanner *scanner, pj_pool_t *pool, 74 74 pj_bool_t parse_params); 75 75 … … 351 351 } 352 352 353 /* Parse tel: URI */ 354 static pjsip_tel_uri *tel_uri_parse( pj_scanner *scanner, pj_pool_t *pool, 355 pj_bool_t parse_params) 353 /* Parse tel: URI 354 * THis actually returns (pjsip_tel_uri *) type. 355 */ 356 static void* tel_uri_parse( pj_scanner *scanner, pj_pool_t *pool, 357 pj_bool_t parse_params) 356 358 { 357 359 pjsip_tel_uri *uri; -
pjproject/trunk/pjsip/src/pjsip/sip_transaction.c
r141 r145 45 45 ** 46 46 ***************************************************************************** 47 47 **/ 48 48 /* Prototypes. */ 49 49 static pj_status_t mod_tsx_layer_load(pjsip_endpoint *endpt); … … 409 409 ** 410 410 ***************************************************************************** 411 411 **/ 412 412 /* 413 413 * Create transaction layer module and registers it to the endpoint. … … 771 771 ** 772 772 ***************************************************************************** 773 773 **/ 774 774 /* 775 775 * Lock transaction and set the value of Thread Local Storage. -
pjproject/trunk/pjsip/src/pjsip/sip_transport.c
r127 r145 321 321 len = pj_snprintf(info_buf, sizeof(info_buf), 322 322 "Request msg %.*s/cseq=%d (%s)", 323 msg->line.req.method.name.slen,323 (int)msg->line.req.method.name.slen, 324 324 msg->line.req.method.name.ptr, 325 325 cseq->cseq, obj_name); … … 328 328 "Response msg %d/%.*s/cseq=%d (%s)", 329 329 msg->line.status.code, 330 cseq->method.name.slen,330 (int)cseq->method.name.slen, 331 331 cseq->method.name.ptr, 332 332 cseq->cseq, obj_name); … … 445 445 PJ_DEF(pj_status_t) pjsip_transport_send( pjsip_transport *tr, 446 446 pjsip_tx_data *tdata, 447 const pj_sockaddr *addr,447 const pj_sockaddr_t *addr, 448 448 int addr_len, 449 449 void *token, … … 466 466 pj_memcpy(&tdata->tp_info.dst_addr, addr, addr_len); 467 467 tdata->tp_info.dst_addr_len = addr_len; 468 if ( addr->sa_family == PJ_AF_INET) {468 if (((pj_sockaddr*)addr)->sa_family == PJ_AF_INET) { 469 469 const char *str_addr; 470 470 str_addr = pj_inet_ntoa(((pj_sockaddr_in*)addr)->sin_addr); -
pjproject/trunk/pjsip/src/pjsip/sip_ua_layer.c
r141 r145 625 625 626 626 if (rdata->msg_info.cseq->method.id == PJSIP_INVITE_METHOD) { 627 pj_str_t *to_tag = &rdata->msg_info.to->tag;627 //pj_str_t *to_tag = &rdata->msg_info.to->tag; 628 628 629 629 /* Must hold UA mutex before accessing dialog set. */ -
pjproject/trunk/pjsip/src/pjsua/pjsua.c
r141 r145 19 19 #include "pjsua.h" 20 20 21 struct pjsua pjsua;22 21 23 22 #define THIS_FILE "pjsua.c" 24 23 24 struct pjsua_t pjsua; 25 25 26 26 #define PJSUA_LOCAL_URI "<sip:user@127.0.0.1>" -
pjproject/trunk/pjsip/src/pjsua/pjsua.h
r141 r145 37 37 38 38 /* PJSUA application variables. */ 39 extern struct pjsua 39 extern struct pjsua_t 40 40 { 41 41 /* Control: */
Note: See TracChangeset
for help on using the changeset viewer.