|
@@ -274,6 +274,7 @@ void publ_cback_func(struct cell *t, int type, struct tmcb_params *ps)
|
|
publ.content_type= hentity->content_type;
|
|
publ.content_type= hentity->content_type;
|
|
publ.id= hentity->id;
|
|
publ.id= hentity->id;
|
|
publ.extra_headers= hentity->extra_headers;
|
|
publ.extra_headers= hentity->extra_headers;
|
|
|
|
+ publ.outbound_proxy = hentity->outbound_proxy;
|
|
publ.cb_param= hentity->cb_param;
|
|
publ.cb_param= hentity->cb_param;
|
|
|
|
|
|
if (dbmode == PUA_DB_ONLY && pua_dbf.end_transaction)
|
|
if (dbmode == PUA_DB_ONLY && pua_dbf.end_transaction)
|
|
@@ -692,8 +693,9 @@ send_publish:
|
|
result= tmb.t_request(&uac_r,
|
|
result= tmb.t_request(&uac_r,
|
|
publ->pres_uri, /*! Request-URI */
|
|
publ->pres_uri, /*! Request-URI */
|
|
publ->pres_uri, /*! To */
|
|
publ->pres_uri, /*! To */
|
|
- publ->pres_uri, /*! From */
|
|
|
|
- &outbound_proxy /*! Outbound proxy*/
|
|
|
|
|
|
+ publ->pres_uri, /*! From */
|
|
|
|
+ publ->outbound_proxy?
|
|
|
|
+ publ->outbound_proxy:&outbound_proxy /*! Outbound proxy*/
|
|
);
|
|
);
|
|
|
|
|
|
if(result< 0)
|
|
if(result< 0)
|
|
@@ -757,6 +759,9 @@ ua_pres_t* publish_cbparam(publ_info_t* publ,str* body,str* tuple_id,
|
|
|
|
|
|
size= sizeof(ua_pres_t)+ sizeof(str)+ (publ->pres_uri->len+
|
|
size= sizeof(ua_pres_t)+ sizeof(str)+ (publ->pres_uri->len+
|
|
+ publ->content_type.len+ publ->id.len+ 1)*sizeof(char);
|
|
+ publ->content_type.len+ publ->id.len+ 1)*sizeof(char);
|
|
|
|
+
|
|
|
|
+ if(publ->outbound_proxy)
|
|
|
|
+ size+= sizeof(str)+ publ->outbound_proxy->len* sizeof(char);
|
|
if(body && body->s && body->len)
|
|
if(body && body->s && body->len)
|
|
size+= sizeof(str)+ body->len* sizeof(char);
|
|
size+= sizeof(str)+ body->len* sizeof(char);
|
|
if(publ->etag)
|
|
if(publ->etag)
|
|
@@ -822,6 +827,16 @@ ua_pres_t* publish_cbparam(publ_info_t* publ,str* body,str* tuple_id,
|
|
cb_param->extra_headers->len= publ->extra_headers->len;
|
|
cb_param->extra_headers->len= publ->extra_headers->len;
|
|
size+= publ->extra_headers->len;
|
|
size+= publ->extra_headers->len;
|
|
}
|
|
}
|
|
|
|
+ if(publ->outbound_proxy)
|
|
|
|
+ {
|
|
|
|
+ cb_param->outbound_proxy = (str*)((char*)cb_param + size);
|
|
|
|
+ size += sizeof(str);
|
|
|
|
+ cb_param->outbound_proxy->s = (char*)cb_param + size;
|
|
|
|
+ memcpy(cb_param->outbound_proxy->s, publ->outbound_proxy->s,
|
|
|
|
+ publ->outbound_proxy->len);
|
|
|
|
+ cb_param->outbound_proxy->len = publ->outbound_proxy->len;
|
|
|
|
+ size+= publ->outbound_proxy->len;
|
|
|
|
+ }
|
|
|
|
|
|
if(publ->content_type.s && publ->content_type.len)
|
|
if(publ->content_type.s && publ->content_type.len)
|
|
{
|
|
{
|
|
@@ -837,6 +852,7 @@ ua_pres_t* publish_cbparam(publ_info_t* publ,str* body,str* tuple_id,
|
|
cb_param->tuple_id.len= tuple_id->len;
|
|
cb_param->tuple_id.len= tuple_id->len;
|
|
size+= tuple_id->len;
|
|
size+= tuple_id->len;
|
|
}
|
|
}
|
|
|
|
+
|
|
cb_param->event= publ->event;
|
|
cb_param->event= publ->event;
|
|
cb_param->flag|= publ->source_flag;
|
|
cb_param->flag|= publ->source_flag;
|
|
cb_param->cb_param= publ->cb_param;
|
|
cb_param->cb_param= publ->cb_param;
|