~ubuntu-branches/debian/sid/kamailio/sid

« back to all changes in this revision

Viewing changes to modules/dmq/notification_peer.c

  • Committer: Package Import Robot
  • Author(s): Victor Seva
  • Date: 2014-01-06 11:47:13 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20140106114713-t8xidp4arzrnyeya
Tags: 4.1.1-1
* New upstream release
* debian/patches:
  - add upstream fixes
* Added tls outbound websocket autheph dnssec modules
  - openssl exception added to their license
* removing sparc and ia64 from supported archs
  for mono module (Closes: #728915)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "notification_peer.h"
28
28
 
29
 
static str notification_content_type = str_init("text/plain");
 
29
str notification_content_type = str_init("text/plain");
30
30
dmq_resp_cback_t notification_callback = {&notification_resp_callback_f, 0};
31
31
 
32
32
/**
162
162
        unsigned int maxforwards = 1;
163
163
        /* received dmqnode list */
164
164
        LM_DBG("dmq triggered from dmq_notification_callback\n");
165
 
        /* parse the message headers */
166
 
        if(parse_headers(msg, HDR_EOH_F, 0) < 0) {
167
 
                LM_ERR("error parsing message headers\n");
168
 
                goto error;
169
 
        }
170
165
        
171
166
        /* extract the maxforwards value, if any */
172
167
        if(msg->maxforwards) {
191
186
        if(nodes_recv > 0 && maxforwards > 0) {
192
187
                /* maxforwards is set to 0 so that the message is will not be in a spiral */
193
188
                bcast_dmq_message(dmq_notification_peer, response_body, 0,
194
 
                                &notification_callback, maxforwards);
 
189
                                &notification_callback, maxforwards, &notification_content_type);
195
190
        }
196
191
        LM_DBG("broadcasted message\n");
197
192
        pkg_free(response_body);
267
262
                return -1;
268
263
        }
269
264
        ret = dmq_send_message(dmq_notification_peer, body, node,
270
 
                        &notification_callback, forward);
 
265
                        &notification_callback, forward, &notification_content_type);
271
266
        pkg_free(body->s);
272
267
        pkg_free(body);
273
268
        return ret;