Index: pjproject/branches/symbian/pjsip/src/pjsip/sip_dialog.c
===================================================================
--- pjproject/branches/symbian/pjsip/src/pjsip/sip_dialog.c	(revision 474)
+++ pjproject/branches/symbian/pjsip/src/pjsip/sip_dialog.c	(revision 789)
@@ -70,5 +70,5 @@
 	return PJ_ENOMEM;
 
-    dlg = pj_pool_zalloc(pool, sizeof(pjsip_dialog));
+    dlg = (pjsip_dialog*)pj_pool_zalloc(pool, sizeof(pjsip_dialog));
     PJ_ASSERT_RETURN(dlg != NULL, PJ_ENOMEM);
 
@@ -145,5 +145,6 @@
 	    pjsip_hdr *hdr;
 
-	    hdr = pjsip_parse_hdr(dlg->pool, &param->name, param->value.ptr,
+	    hdr = (pjsip_hdr *)
+		  pjsip_parse_hdr(dlg->pool, &param->name, param->value.ptr,
 				  param->value.slen, NULL);
 	    if (hdr == NULL) {
@@ -290,8 +291,9 @@
      * both local and remote URI.
      */
-    tmp.ptr = pj_pool_alloc(rdata->tp_info.pool, TMP_LEN);
+    tmp.ptr = (char*)pj_pool_alloc(rdata->tp_info.pool, TMP_LEN);
 
     /* Init local info from the To header. */
-    dlg->local.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.to);
+    dlg->local.info = (pjsip_to_hdr*)
+		      pjsip_hdr_clone(dlg->pool, rdata->msg_info.to);
     pjsip_fromto_hdr_set_from(dlg->local.info);
 
@@ -348,5 +350,6 @@
 
     /* Init remote info from the From header. */
-    dlg->remote.info = pjsip_hdr_clone(dlg->pool, rdata->msg_info.from);
+    dlg->remote.info = (pjsip_from_hdr*)
+		       pjsip_hdr_clone(dlg->pool, rdata->msg_info.from);
     pjsip_fromto_hdr_set_to(dlg->remote.info);
 
@@ -365,5 +368,6 @@
 
     /* Init remote's contact from Contact header. */
-    contact_hdr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
+    contact_hdr = (pjsip_hdr*)
+	          pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
 				     NULL);
     if (!contact_hdr) {
@@ -371,5 +375,6 @@
 	goto on_error;
     }
-    dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact_hdr);
+    dlg->remote.contact = (pjsip_contact_hdr*)
+			  pjsip_hdr_clone(dlg->pool, contact_hdr);
 
     /* Init remote's CSeq from CSeq header */
@@ -391,5 +396,6 @@
 
     /* Call-ID */
-    dlg->call_id = pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid);
+    dlg->call_id = (pjsip_cid_hdr*)
+		   pjsip_hdr_clone(dlg->pool, rdata->msg_info.cid);
 
     /* Route set. 
@@ -406,5 +412,5 @@
 
 	/* Clone the Record-Route, change the type to Route header. */
-	route = pjsip_hdr_clone(dlg->pool, rr);
+	route = (pjsip_route_hdr*)pjsip_hdr_clone(dlg->pool, rr);
 	pjsip_routing_hdr_set_route(route);
 
@@ -416,5 +422,6 @@
 	if (rr == (pjsip_rr_hdr*)&rdata->msg_info.msg->hdr)
 	    break;
-	rr = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_RECORD_ROUTE, rr);
+	rr = (pjsip_route_hdr*)
+	     pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_RECORD_ROUTE, rr);
     }
 
@@ -501,8 +508,9 @@
 
     /* Clone remote target. */
-    dlg->target = pjsip_uri_clone(dlg->pool, first_dlg->target);
+    dlg->target = (pjsip_uri*) pjsip_uri_clone(dlg->pool, first_dlg->target);
 
     /* Clone local info. */
-    dlg->local.info = pjsip_hdr_clone(dlg->pool, first_dlg->local.info);
+    dlg->local.info = (pjsip_fromto_hdr*)
+		      pjsip_hdr_clone(dlg->pool, first_dlg->local.info);
 
     /* Clone local tag. */
@@ -515,8 +523,10 @@
 
     /* Clone local Contact. */
-    dlg->local.contact = pjsip_hdr_clone(dlg->pool, first_dlg->local.contact);
+    dlg->local.contact = (pjsip_contact_hdr*)
+			 pjsip_hdr_clone(dlg->pool, first_dlg->local.contact);
 
     /* Clone remote info. */
-    dlg->remote.info = pjsip_hdr_clone(dlg->pool, first_dlg->remote.info);
+    dlg->remote.info = (pjsip_fromto_hdr*)
+		       pjsip_hdr_clone(dlg->pool, first_dlg->remote.info);
 
     /* Set remote tag from the response. */
@@ -542,5 +552,6 @@
 
     /* Clone Call-ID header. */
-    dlg->call_id = pjsip_hdr_clone(dlg->pool, first_dlg->call_id);
+    dlg->call_id = (pjsip_cid_hdr*)
+		   pjsip_hdr_clone(dlg->pool, first_dlg->call_id);
 
     /* Duplicate Route-Set. */
@@ -550,5 +561,5 @@
 	pjsip_route_hdr *h;
 
-	h = pjsip_hdr_clone(dlg->pool, r);
+	h = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, r);
 	pj_list_push_back(&dlg->route_set, h);
 
@@ -653,5 +664,5 @@
 	pjsip_route_hdr *new_r;
 
-	new_r = pjsip_hdr_clone(dlg->pool, r);
+	new_r = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, r);
 	pj_list_push_back(&dlg->route_set, new_r);
 
@@ -860,5 +871,5 @@
     for (; route != end_list; route = route->next ) {
 	pjsip_route_hdr *r;
-	r = pjsip_hdr_shallow_clone( tdata->pool, route );
+	r = (pjsip_route_hdr*) pjsip_hdr_shallow_clone( tdata->pool, route );
 	pjsip_routing_hdr_set_route(r);
 	pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*)r);
@@ -1041,5 +1052,6 @@
 	    /* Add contact header only if one is not present. */
 	    if (pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL) == 0) {
-		hdr = pjsip_hdr_clone(tdata->pool, dlg->local.contact);
+		hdr = (pjsip_hdr*) 
+		      pjsip_hdr_clone(tdata->pool, dlg->local.contact);
 		pjsip_msg_add_hdr(tdata->msg, hdr);
 	    }
@@ -1053,5 +1065,5 @@
 					       PJSIP_H_ALLOW, NULL);
 	    if (c_hdr) {
-		hdr = pjsip_hdr_clone(tdata->pool, c_hdr);
+		hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, c_hdr);
 		pjsip_msg_add_hdr(tdata->msg, hdr);
 	    }
@@ -1065,5 +1077,5 @@
 					       PJSIP_H_SUPPORTED, NULL);
 	    if (c_hdr) {
-		hdr = pjsip_hdr_clone(tdata->pool, c_hdr);
+		hdr = (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, c_hdr);
 		pjsip_msg_add_hdr(tdata->msg, hdr);
 	    }
@@ -1238,5 +1250,5 @@
 	while (hdr != hdr_list) {
 	    pjsip_msg_add_hdr(tdata->msg,
-			      pjsip_hdr_clone(tdata->pool, hdr));
+			      (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, hdr));
 	    hdr = hdr->next;
 	}
@@ -1387,5 +1399,5 @@
 	    if (hdr->type == PJSIP_H_RECORD_ROUTE) {
 		pjsip_route_hdr *r;
-		r = pjsip_hdr_clone(dlg->pool, hdr);
+		r = (pjsip_route_hdr*) pjsip_hdr_clone(dlg->pool, hdr);
 		pjsip_routing_hdr_set_route(r);
 		pj_list_push_back(&dlg->route_set, r);
@@ -1396,8 +1408,10 @@
 	 * field of the response.
 	 */
-	contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
+	contact = (pjsip_contact_hdr*) 
+		  pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
 				     NULL);
 	if (contact) {
-	    dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact);
+	    dlg->remote.contact = (pjsip_contact_hdr*)
+				  pjsip_hdr_clone(dlg->pool, contact);
 	    dlg->target = dlg->remote.contact->uri;
 	}
@@ -1414,8 +1428,10 @@
 	pjsip_contact_hdr *contact;
 
-	contact = pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
+	contact = (pjsip_contact_hdr*) 
+		  pjsip_msg_find_hdr(rdata->msg_info.msg, PJSIP_H_CONTACT, 
 				     NULL);
 	if (contact) {
-	    dlg->remote.contact = pjsip_hdr_clone(dlg->pool, contact);
+	    dlg->remote.contact = (pjsip_contact_hdr*) 
+				  pjsip_hdr_clone(dlg->pool, contact);
 	    dlg->target = dlg->remote.contact->uri;
 	}
