Skip to content

Commit

Permalink
pua_dialog_info: failed calls should not trigger PUBLISH errors
Browse files Browse the repository at this point in the history
 - related to Issue #142
  • Loading branch information
ovidiusas committed Jan 27, 2014
1 parent 51b5195 commit 188b2e7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/pua_dialoginfo/dialog_publish.c
Expand Up @@ -295,6 +295,7 @@ void dialog_publish(char *state, struct to_body* entity, struct to_body *peer, s
{
str* body= NULL;
publ_info_t publ;
int ret_code;

body= build_dialoginfo(state, entity, peer, callid, initiator, localtag, remotetag);
if(body == NULL || body->s == NULL)
Expand Down Expand Up @@ -325,8 +326,12 @@ void dialog_publish(char *state, struct to_body* entity, struct to_body *peer, s
publ.outbound_proxy = presence_server;

print_publ(&publ);
if(pua_send_publish(&publ)< 0)
{
ret_code = pua_send_publish(&publ);
switch (ret_code) {
case ERR_PUBLISH_NO_ERROR:
case ERR_PUBLISH_NO_RECORD:
break;
default:
LM_ERR("sending publish failed for pres_uri [%.*s] to server [%.*s]\n",
publ.pres_uri->len, publ.pres_uri->s,
publ.outbound_proxy.len, publ.outbound_proxy.s);
Expand Down

0 comments on commit 188b2e7

Please sign in to comment.