Index: /pjproject/trunk/build.symbian/bld.inf
===================================================================
--- /pjproject/trunk/build.symbian/bld.inf	(revision 1268)
+++ /pjproject/trunk/build.symbian/bld.inf	(revision 1269)
@@ -1,2 +1,7 @@
+prj_platforms
+winscw
+armv5
+gcce
+
 prj_mmpfiles
 pjlib.mmp
Index: /pjproject/trunk/build.symbian/pjlib.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjlib.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjlib.mmp	(revision 1269)
@@ -7,4 +7,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 MACRO		PJ_M_I386=1
@@ -57,35 +59,35 @@
 SOURCE		unicode_symbian.cpp
 
-DOCUMENT	os_symbian.h
+//DOCUMENT	os_symbian.h
 
-DOCUMENT	pj\addr_resolv.h
-DOCUMENT	pj\array.h
-DOCUMENT	pj\assert.h
-DOCUMENT	pj\config.h
-DOCUMENT	pj\config_site.h
+//DOCUMENT	pj\addr_resolv.h
+//DOCUMENT	pj\array.h
+//DOCUMENT	pj\assert.h
+//DOCUMENT	pj\config.h
+//DOCUMENT	pj\config_site.h
 //DOCUMENT	pj\config_site_sample.h
-DOCUMENT	pj\ctype.h
-DOCUMENT	pj\errno.h
-DOCUMENT	pj\except.h
-DOCUMENT	pj\file_access.h
-DOCUMENT	pj\file_io.h
-DOCUMENT	pj\guid.h
-DOCUMENT	pj\hash.h
-DOCUMENT	pj\ioqueue.h
-DOCUMENT	pj\ip_helper.h
-DOCUMENT	pj\list.h
-DOCUMENT	pj\lock.h
-DOCUMENT	pj\log.h
-DOCUMENT	pj\os.h
-DOCUMENT	pj\\pool.h
-DOCUMENT	pj\\pool_buf.h
-DOCUMENT	pj\rand.h
-DOCUMENT	pj\rbtree.h
-DOCUMENT	pj\sock.h
-DOCUMENT	pj\sock_select.h
-DOCUMENT	pj\string.h
-DOCUMENT	pj\timer.h
-DOCUMENT	pj\types.h
-DOCUMENT	pj\unicode.h
+//DOCUMENT	pj\ctype.h
+//DOCUMENT	pj\errno.h
+//DOCUMENT	pj\except.h
+//DOCUMENT	pj\file_access.h
+//DOCUMENT	pj\file_io.h
+//DOCUMENT	pj\guid.h
+//DOCUMENT	pj\hash.h
+//DOCUMENT	pj\ioqueue.h
+//DOCUMENT	pj\ip_helper.h
+//DOCUMENT	pj\list.h
+//DOCUMENT	pj\lock.h
+//DOCUMENT	pj\log.h
+//DOCUMENT	pj\os.h
+//DOCUMENT	pj\\pool.h
+//DOCUMENT	pj\\pool_buf.h
+//DOCUMENT	pj\rand.h
+//DOCUMENT	pj\rbtree.h
+//DOCUMENT	pj\sock.h
+//DOCUMENT	pj\sock_select.h
+//DOCUMENT	pj\string.h
+//DOCUMENT	pj\timer.h
+//DOCUMENT	pj\types.h
+//DOCUMENT	pj\unicode.h
 
 SYSTEMINCLUDE	..\pjlib\include
Index: /pjproject/trunk/build.symbian/pjlib_test.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjlib_test.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjlib_test.mmp	(revision 1269)
@@ -10,4 +10,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 // Test files
Index: /pjproject/trunk/build.symbian/pjlib_util.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjlib_util.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjlib_util.mmp	(revision 1269)
@@ -10,4 +10,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 //
Index: /pjproject/trunk/build.symbian/pjmedia.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjmedia.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjmedia.mmp	(revision 1269)
@@ -75,5 +75,5 @@
 SYSTEMINCLUDE	\epoc32\include
 SYSTEMINCLUDE	\epoc32\include\libc
-SYSTEMINCLUDE	\epoc32\include\mmf\plugin
+//SYSTEMINCLUDE	\epoc32\include\mmf\plugin
 
 CAPABILITY	None
Index: /pjproject/trunk/build.symbian/pjnath.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjnath.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjnath.mmp	(revision 1269)
@@ -9,5 +9,7 @@
 MACRO		PJ_SYMBIAN=1
 
-//OPTION		CW -lang c++
+OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 //
@@ -46,6 +48,6 @@
 SYSTEMINCLUDE	\epoc32\include\libc
 
-LIBRARY		pjlib.lib 
-LIBRARY		pjlib_util.lib 
+//STATICLIBRARY		pjlib.lib 
+//STATICLIBRARY		pjlib_util.lib 
 CAPABILITY	None
 
Index: /pjproject/trunk/build.symbian/pjsdp.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjsdp.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjsdp.mmp	(revision 1269)
@@ -7,4 +7,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 MACRO		PJ_M_I386=1
Index: /pjproject/trunk/build.symbian/pjsip.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjsip.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjsip.mmp	(revision 1269)
@@ -10,4 +10,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 // PJSIP-CORE files
Index: /pjproject/trunk/build.symbian/pjsip_simple.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjsip_simple.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjsip_simple.mmp	(revision 1269)
@@ -10,4 +10,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 
Index: /pjproject/trunk/build.symbian/pjsip_ua.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjsip_ua.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjsip_ua.mmp	(revision 1269)
@@ -12,5 +12,5 @@
 
 
-// PJSIP-SIMPLE files
+// PJSIP-UA files
 
 SOURCE	sip_inv.c
Index: /pjproject/trunk/build.symbian/pjstun_client.mmp
===================================================================
--- /pjproject/trunk/build.symbian/pjstun_client.mmp	(revision 1268)
+++ /pjproject/trunk/build.symbian/pjstun_client.mmp	(revision 1269)
@@ -10,4 +10,6 @@
 
 OPTION		CW -lang c++
+OPTION		ARMCC --cpp
+OPTION		GCC	-x c++
 
 // PJSTUN-CLIENT files
Index: /pjproject/trunk/pjlib/include/pj/compat/cc_armcc.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/compat/cc_armcc.h	(revision 1268)
+++ /pjproject/trunk/pjlib/include/pj/compat/cc_armcc.h	(revision 1269)
@@ -34,6 +34,10 @@
 #define PJ_CC_VER_3		__ARMCC_PATCHLEVEL__
 
+#ifdef __cplusplus
+#  define PJ_INLINE_SPECIFIER	inline
+#else
+#  define PJ_INLINE_SPECIFIER	static __inline
+#endif
 
-#define PJ_INLINE_SPECIFIER	static // why is not inline accepted?
 #define PJ_THREAD_FUNC	
 #define PJ_NORETURN		
Index: /pjproject/trunk/pjlib/include/pj/compat/os_symbian.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/compat/os_symbian.h	(revision 1268)
+++ /pjproject/trunk/pjlib/include/pj/compat/os_symbian.h	(revision 1269)
@@ -145,5 +145,7 @@
 typedef unsigned int socklen_t;
 
+#ifndef __GCCE__
 #include <e32def.h>
+#endif
 
 /*
Index: /pjproject/trunk/pjlib/include/pj/errno.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/errno.h	(revision 1268)
+++ /pjproject/trunk/pjlib/include/pj/errno.h	(revision 1269)
@@ -112,4 +112,5 @@
 			       char *buf, pj_size_t bufsize);
 
+typedef pj_str_t (*pjsip_error_callback)(pj_status_t, char*, pj_size_t);
 /**
  * Register strerror message handler for the specified error space.
@@ -133,6 +134,5 @@
 PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start_code,
 					  pj_status_t err_space,
-					  pj_str_t (*f)(pj_status_t,char*,
-							pj_size_t));
+					  pjsip_error_callback f);
 
 /**
Index: /pjproject/trunk/pjlib/include/pj/except.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/except.h	(revision 1268)
+++ /pjproject/trunk/pjlib/include/pj/except.h	(revision 1269)
@@ -27,4 +27,5 @@
 #include <pj/types.h>
 #include <pj/compat/setjmp.h>
+#include <pj/log.h>
 
 
@@ -266,4 +267,13 @@
 #define PJ_GET_EXCEPTION()	pj_excp_.code_
 
+#else
+
+#define PJ_USE_EXCEPTION
+#define PJ_TRY				
+#define PJ_CATCH_ANY		if (0)
+#define PJ_END
+#define PJ_THROW(x_id)		do { PJ_LOG(1,("PJ_THROW"," error code = %d",x_id)); } while (0)
+#define PJ_GET_EXCEPTION()	0
+
 #endif	/* __cplusplus */
 
Index: /pjproject/trunk/pjlib/include/pj/types.h
===================================================================
--- /pjproject/trunk/pjlib/include/pj/types.h	(revision 1268)
+++ /pjproject/trunk/pjlib/include/pj/types.h	(revision 1269)
@@ -303,4 +303,5 @@
 PJ_DECL(void) pj_shutdown(void);
 
+typedef void (*pj_exit_callback)(void);
 /**
  * Register cleanup function to be called by PJLIB when pj_shutdown() is 
@@ -311,5 +312,5 @@
  * @return PJ_SUCCESS on success.
  */
-PJ_DECL(pj_status_t) pj_atexit(void (*func)(void));
+PJ_DECL(pj_status_t) pj_atexit(pj_exit_callback func);
 
 
Index: /pjproject/trunk/pjlib/src/pj/addr_resolv_symbian.cpp
===================================================================
--- /pjproject/trunk/pjlib/src/pj/addr_resolv_symbian.cpp	(revision 1268)
+++ /pjproject/trunk/pjlib/src/pj/addr_resolv_symbian.cpp	(revision 1269)
@@ -36,5 +36,5 @@
     wchar_t name16[PJ_MAX_HOSTNAME];
     pj_ansi_to_unicode(name->ptr, name->slen, name16, PJ_ARRAY_SIZE(name16));
-    TPtrC16 data(name16);
+    TPtrC16 data((const TUint16*)name16);
 
     // Resolve!
@@ -66,5 +66,5 @@
 
     // Convert the official address to ANSI.
-    pj_unicode_to_ansi(nameEntry().iName.Ptr(), nameEntry().iName.Length(),
+    pj_unicode_to_ansi((const wchar_t*)nameEntry().iName.Ptr(), nameEntry().iName.Length(),
 		       resolved_name, sizeof(resolved_name));
 
Index: /pjproject/trunk/pjlib/src/pj/errno.c
===================================================================
--- /pjproject/trunk/pjlib/src/pj/errno.c	(revision 1268)
+++ /pjproject/trunk/pjlib/src/pj/errno.c	(revision 1269)
@@ -104,6 +104,5 @@
 PJ_DECL(pj_status_t) pj_register_strerror(pj_status_t start,
 					  pj_status_t space,
-					  pj_str_t (*f)(pj_status_t,char*,
-							pj_size_t))
+					  pjsip_error_callback f)
 {
     unsigned i;
Index: /pjproject/trunk/pjlib/src/pj/exception_symbian.cpp
===================================================================
--- /pjproject/trunk/pjlib/src/pj/exception_symbian.cpp	(revision 1268)
+++ /pjproject/trunk/pjlib/src/pj/exception_symbian.cpp	(revision 1269)
@@ -23,5 +23,4 @@
 #include <pj/errno.h>
 
-static long thread_local_id = -1;
 
 #if defined(PJ_HAS_EXCEPTION_NAMES) && PJ_HAS_EXCEPTION_NAMES != 0
Index: /pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp
===================================================================
--- /pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp	(revision 1268)
+++ /pjproject/trunk/pjlib/src/pj/os_core_symbian.cpp	(revision 1269)
@@ -302,5 +302,5 @@
 
 
-PJ_DEF(pj_status_t) pj_atexit(void (*func)(void))
+PJ_DEF(pj_status_t) pj_atexit(pj_exit_callback func)
 {
     if (atexit_count >= PJ_ARRAY_SIZE(atexit_func))
@@ -460,5 +460,5 @@
 PJ_DEF(void) pj_thread_local_free(long index)
 {
-    PJ_ASSERT_ON_FAIL(index >= 0 && index < PJ_ARRAY_SIZE(tls_vars) &&
+    PJ_ASSERT_ON_FAIL(index >= 0 && index < (int)PJ_ARRAY_SIZE(tls_vars) &&
 		     tls_vars[index] != 0, return);
 
@@ -474,5 +474,5 @@
     pj_thread_t *rec = pj_thread_this();
 
-    PJ_ASSERT_RETURN(index >= 0 && index < PJ_ARRAY_SIZE(tls_vars) &&
+    PJ_ASSERT_RETURN(index >= 0 && index < (int)PJ_ARRAY_SIZE(tls_vars) &&
 		     tls_vars[index] != 0, PJ_EINVAL);
 
@@ -488,5 +488,5 @@
     pj_thread_t *rec = pj_thread_this();
 
-    PJ_ASSERT_RETURN(index >= 0 && index < PJ_ARRAY_SIZE(tls_vars) &&
+    PJ_ASSERT_RETURN(index >= 0 && index < (int)PJ_ARRAY_SIZE(tls_vars) &&
 		     tls_vars[index] != 0, NULL);
 
Index: /pjproject/trunk/pjlib/src/pj/sock_symbian.cpp
===================================================================
--- /pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 1268)
+++ /pjproject/trunk/pjlib/src/pj/sock_symbian.cpp	(revision 1269)
@@ -272,5 +272,5 @@
     temp_addr.Output(str16);
  
-    return pj_unicode_to_ansi(str16.PtrZ(), str16.Length(),
+    return pj_unicode_to_ansi((const wchar_t*)str16.PtrZ(), str16.Length(),
 			      str8, sizeof(str8));
 }
@@ -308,5 +308,5 @@
 		       tempaddr16, sizeof(tempaddr16));
 
-    TBuf<MAXIPLEN> ip_addr(tempaddr16);
+    TBuf<MAXIPLEN> ip_addr((const TText*)tempaddr16);
 
     TInetAddr addr;
@@ -419,5 +419,5 @@
 	User::WaitForRequest(reqStatus);
 
-	hostname.ptr = pj_unicode_to_ansi(tmpName.Ptr(), tmpName.Length(),
+	hostname.ptr = pj_unicode_to_ansi((const wchar_t*)tmpName.Ptr(), tmpName.Length(),
 					  buf, sizeof(buf));
 	hostname.slen = tmpName.Length();
@@ -552,5 +552,5 @@
     
     PJ_ASSERT_RETURN(sock && addr && namelen && 
-		     *namelen>=sizeof(pj_sockaddr_in), PJ_EINVAL);
+		     *namelen>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
 
     CPjSocket *pjSock = (CPjSocket*)sock;
@@ -579,5 +579,5 @@
     
     PJ_ASSERT_RETURN(sock && addr && namelen && 
-		     *namelen>=sizeof(pj_sockaddr_in), PJ_EINVAL);
+		     *namelen>=(int)sizeof(pj_sockaddr_in), PJ_EINVAL);
 
     CPjSocket *pjSock = (CPjSocket*)sock;
@@ -729,5 +729,5 @@
     PJ_ASSERT_RETURN(sock && buf && len && from && fromlen, PJ_EINVAL);
     PJ_ASSERT_RETURN(*len > 0, PJ_EINVAL);
-    PJ_ASSERT_RETURN(*fromlen >= sizeof(pj_sockaddr_in), PJ_EINVAL);
+    PJ_ASSERT_RETURN(*fromlen >= (int)sizeof(pj_sockaddr_in), PJ_EINVAL);
 
     CPjSocket *pjSock = (CPjSocket*)sock;
Index: /pjproject/trunk/pjlib/src/pjlib-test/main_symbian.cpp
===================================================================
--- /pjproject/trunk/pjlib/src/pjlib-test/main_symbian.cpp	(revision 1268)
+++ /pjproject/trunk/pjlib/src/pjlib-test/main_symbian.cpp	(revision 1269)
@@ -52,5 +52,5 @@
     // add your program code here, example code below
     //
-    int rc = test_main();
+    test_main();
 
     console->Printf(_L(" [press any key]\n"));
Index: /pjproject/trunk/pjmedia/src/pjmedia/bidirectional.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/bidirectional.c	(revision 1268)
+++ /pjproject/trunk/pjmedia/src/pjmedia/bidirectional.c	(revision 1269)
@@ -55,5 +55,5 @@
     struct bidir_port *port;
 
-    port = pj_pool_zalloc(pool, sizeof(struct bidir_port));
+    port = PJ_POOL_ZALLOC_T(pool, struct bidir_port);
 
     pjmedia_port_info_init(&port->base.info, &get_port->info.name, SIGNATURE,
Index: /pjproject/trunk/pjmedia/src/pjmedia/echo_common.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/echo_common.c	(revision 1268)
+++ /pjproject/trunk/pjmedia/src/pjmedia/echo_common.c	(revision 1269)
@@ -18,4 +18,5 @@
  */
 
+#include <pjmedia/config.h>
 #include <pjmedia/echo.h>
 #include <pj/assert.h>
Index: /pjproject/trunk/pjmedia/src/pjmedia/nullsound.c
===================================================================
--- /pjproject/trunk/pjmedia/src/pjmedia/nullsound.c	(revision 1268)
+++ /pjproject/trunk/pjmedia/src/pjmedia/nullsound.c	(revision 1269)
@@ -68,5 +68,5 @@
 PJ_DEF(const pjmedia_snd_dev_info*) pjmedia_snd_get_dev_info(unsigned index)
 {
-    PJ_ASSERT_RETURN(index==0 || index==-1, NULL);
+    PJ_ASSERT_RETURN(index==0 || index==(unsigned)-1, NULL);
     return &null_info;
 }
Index: /pjproject/trunk/pjsip-apps/src/samples/sndinfo.c
===================================================================
--- /pjproject/trunk/pjsip-apps/src/samples/sndinfo.c	(revision 1268)
+++ /pjproject/trunk/pjsip-apps/src/samples/sndinfo.c	(revision 1269)
@@ -257,5 +257,4 @@
     if (argc == 1) {
 	enum_devices();
-	return 0;
     } else if (argc == 6) {
 	
Index: /pjproject/trunk/pjsip/include/pjsip/sip_transport.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_transport.h	(revision 1268)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_transport.h	(revision 1269)
@@ -606,5 +606,6 @@
  *
  *****************************************************************************/
-
+typedef void (*pjsip_transport_callback)(pjsip_transport *tp, void *token,
+                                         pj_ssize_t sent_bytes);
 /**
  * This structure represent the "public" interface of a SIP transport.
@@ -672,7 +673,5 @@
 			    int addr_len,
 			    void *token,
-			    void (*callback)(pjsip_transport *transport,
-					     void *token, 
-					     pj_ssize_t sent_bytes));
+			    pjsip_transport_callback callback);
 
     /**
@@ -885,5 +884,6 @@
  *
  *****************************************************************************/
-
+typedef void (*pjsip_rx_callback)(pjsip_endpoint*, pj_status_t, pjsip_rx_data *);
+typedef pj_status_t (*pjsip_tx_callback)(pjsip_endpoint*, pjsip_tx_data*);
 /**
  * Create a new transport manager.
@@ -900,9 +900,6 @@
 PJ_DECL(pj_status_t) pjsip_tpmgr_create( pj_pool_t *pool,
 					 pjsip_endpoint * endpt,
-					 void (*rx_cb)(pjsip_endpoint*,
-						       pj_status_t,
-						       pjsip_rx_data *),
-					 pj_status_t (*tx_cb)(pjsip_endpoint*,
-							      pjsip_tx_data*),
+					 pjsip_rx_callback rx_cb,
+					 pjsip_tx_callback tx_cb,
 					 pjsip_tpmgr **p_mgr);
 
@@ -988,5 +985,6 @@
 						   pjsip_transport **tp);
 
-
+typedef void (*pjsip_tp_send_callback)(void *token, pjsip_tx_data *tdata,
+									   pj_ssize_t bytes_sent);
 /**
  * Send a SIP message using the specified transport.
@@ -997,7 +995,5 @@
 					   int addr_len,
 					   void *token,
-					   void (*cb)(void *token, 
-						      pjsip_tx_data *tdata,
-						      pj_ssize_t bytes_sent));
+					   pjsip_tp_send_callback cb);
 
 
Index: /pjproject/trunk/pjsip/include/pjsip/sip_util.h
===================================================================
--- /pjproject/trunk/pjsip/include/pjsip/sip_util.h	(revision 1268)
+++ /pjproject/trunk/pjsip/include/pjsip/sip_util.h	(revision 1269)
@@ -259,4 +259,6 @@
 } pjsip_send_state;
 
+typedef void (*pjsip_endpt_callback)(pjsip_send_state*, pj_ssize_t sent,
+									 pj_bool_t *cont);
 /**
  * Send outgoing request statelessly The function will take care of which 
@@ -280,7 +282,5 @@
 				    pjsip_tx_data *tdata,
 				    void *token,
-				    void (*cb)(pjsip_send_state*,
-					       pj_ssize_t sent,
-					       pj_bool_t *cont));
+				    pjsip_endpt_callback cb);
 
 /**
@@ -358,7 +358,5 @@
 					        pjsip_tx_data *tdata,
 						void *token,
-						void (*cb)(pjsip_send_state*,
-							   pj_ssize_t sent,
-							   pj_bool_t *cont));
+						pjsip_endpt_callback cb);
 
 /**
@@ -383,7 +381,5 @@
 					        pjsip_tx_data *tdata,
 						void *token,
-						void (*cb)(pjsip_send_state*,
-							   pj_ssize_t sent,
-							   pj_bool_t *cont));
+						pjsip_endpt_callback cb);
 
 /**
@@ -446,4 +442,5 @@
 					  pjsip_transaction **p_tsx );
 
+typedef void (*pjsip_endpt_send_callback)(void*, pjsip_event*);
 /**
  * Send outgoing request and initiate UAC transaction for the request.
@@ -470,5 +467,5 @@
 					       pj_int32_t timeout,
 					       void *token,
-					       void (*cb)(void*,pjsip_event*));
+					       pjsip_endpt_send_callback cb);
 
 /**
Index: /pjproject/trunk/pjsip/src/pjsip/sip_parser.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_parser.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_parser.c	(revision 1269)
@@ -909,4 +909,5 @@
     parsing_headers = PJ_FALSE;
 
+retry_parse:
     PJ_TRY 
     {
@@ -1055,5 +1056,5 @@
 	    /* Continue parse next header, if any. */
 	    if (!pj_scan_is_eof(scanner) && !IS_NEWLINE(*scanner->curptr)) {
-		goto parse_headers;
+		goto retry_parse;
 	    }
 	}
Index: /pjproject/trunk/pjsip/src/pjsip/sip_transport.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_transport.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_transport.c	(revision 1269)
@@ -549,7 +549,5 @@
 					   int addr_len,
 					   void *token,
-					   void (*cb)(void *token, 
-						      pjsip_tx_data *tdata,
-						      pj_ssize_t))
+					   pjsip_tp_send_callback cb)
 {
     pj_status_t status;
@@ -884,9 +882,6 @@
 PJ_DEF(pj_status_t) pjsip_tpmgr_create( pj_pool_t *pool,
 					pjsip_endpoint *endpt,
-					void (*rx_cb)(pjsip_endpoint*,
-						      pj_status_t,
-						      pjsip_rx_data *),
-					pj_status_t (*tx_cb)(pjsip_endpoint*,
-							     pjsip_tx_data*),
+					pjsip_rx_callback rx_cb,
+					pjsip_tx_callback tx_cb,
 					pjsip_tpmgr **p_mgr)
 {
Index: /pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_transport_loop.c	(revision 1269)
@@ -146,7 +146,5 @@
 				  int addr_len,
 				  void *token,
-				  void (*cb)(pjsip_transport *transport,
-					     void *token, 
-					     pj_ssize_t sent_bytes))
+				  pjsip_transport_callback cb)
 {
     struct loop_transport *loop = (struct loop_transport*)tp;
Index: /pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_transport_tcp.c	(revision 1269)
@@ -450,7 +450,5 @@
 				int addr_len,
 				void *token,
-				void (*callback)(pjsip_transport *transport,
-						 void *token, 
-						 pj_ssize_t sent_bytes));
+				pjsip_transport_callback callback);
 
 /* Called by transport manager to shutdown */
@@ -1039,7 +1037,5 @@
 				int addr_len,
 				void *token,
-				void (*callback)(pjsip_transport *transport,
-						 void *token, 
-						 pj_ssize_t sent_bytes))
+				pjsip_transport_callback callback)
 {
     struct tcp_transport *tcp = (struct tcp_transport*)transport;
@@ -1253,5 +1249,5 @@
 	/* Read next packet. */
 	bytes_read = sizeof(rdata->pkt_info.packet) - rdata->pkt_info.len;
-	rdata->pkt_info.src_addr_len = sizeof(rdata->pkt_info.src_addr);
+	rdata->pkt_info.src_addr_len = sizeof(pj_sockaddr_in);
 	status = pj_ioqueue_recv(key, op_key, 
 				 rdata->pkt_info.packet+rdata->pkt_info.len,
Index: /pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_transport_udp.c	(revision 1269)
@@ -287,7 +287,5 @@
 				 int addr_len,
 				 void *token,
-				 void (*callback)(pjsip_transport*,
-						  void *token,
-						  pj_ssize_t))
+				 pjsip_transport_callback callback)
 {
     struct udp_transport *tp = (struct udp_transport*)transport;
Index: /pjproject/trunk/pjsip/src/pjsip/sip_util.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_util.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_util.c	(revision 1269)
@@ -1006,7 +1006,5 @@
 				   pjsip_tx_data *tdata,
 				   void *token,
-				   void (*cb)(pjsip_send_state*,
-					      pj_ssize_t sent,
-					      pj_bool_t *cont))
+				   pjsip_endpt_callback cb)
 {
     pjsip_host_info dest_info;
@@ -1227,7 +1225,5 @@
 					       pjsip_tx_data *tdata,
 					       void *token,
-					       void (*cb)(pjsip_send_state*,
-							  pj_ssize_t sent,
-							  pj_bool_t *cont))
+					       pjsip_endpt_callback cb)
 {
     /* Determine which transports and addresses to send the response,
@@ -1278,7 +1274,5 @@
 					        pjsip_tx_data *tdata,
 						void *token,
-						void (*cb)(pjsip_send_state*,
-							   pj_ssize_t sent,
-							   pj_bool_t *cont))
+						pjsip_endpt_callback cb)
 {
     pjsip_response_addr res_addr;
Index: /pjproject/trunk/pjsip/src/pjsip/sip_util_statefull.c
===================================================================
--- /pjproject/trunk/pjsip/src/pjsip/sip_util_statefull.c	(revision 1268)
+++ /pjproject/trunk/pjsip/src/pjsip/sip_util_statefull.c	(revision 1269)
@@ -84,5 +84,5 @@
 					       pj_int32_t timeout,
 					       void *token,
-					       void (*cb)(void*,pjsip_event*))
+					       pjsip_endpt_send_callback cb)
 {
     pjsip_transaction *tsx;
