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

« back to all changes in this revision

Viewing changes to action.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:
89
89
#include "tcp_server.h"
90
90
#endif
91
91
#ifdef USE_SCTP
92
 
#include "sctp_server.h"
 
92
#include "sctp_core.h"
93
93
#endif
94
94
#include "switch.h"
95
95
#include "events.h"
111
111
int _last_returned_code  = 0;
112
112
struct onsend_info* p_onsend=0; /* onsend route send info */
113
113
 
114
 
 
 
114
/* current action executed from config file */
 
115
static cfg_action_t *_cfg_crt_action = 0;
 
116
 
 
117
/* return current action executed from config file */
 
118
cfg_action_t *get_cfg_crt_action(void)
 
119
{
 
120
        return _cfg_crt_action;
 
121
}
 
122
 
 
123
/* return line in config for current executed action */
 
124
int get_cfg_crt_line(void)
 
125
{
 
126
        if(_cfg_crt_action==0)
 
127
                return 0;
 
128
        return _cfg_crt_action->cline;
 
129
}
 
130
 
 
131
/* return name of config for current executed action */
 
132
char *get_cfg_crt_name(void)
 
133
{
 
134
        if(_cfg_crt_action==0)
 
135
                return 0;
 
136
        return _cfg_crt_action->cfile;
 
137
}
115
138
 
116
139
/* handle the exit code of a module function call.
117
140
 * (used internally in do_action())
423
446
                                                case PROTO_UDP:
424
447
#ifdef USE_TCP
425
448
                                                case PROTO_TCP:
 
449
                                                case PROTO_WS:
426
450
#endif
427
451
#ifdef USE_TLS
428
452
                                                case PROTO_TLS:
 
453
                                                case PROTO_WSS:
429
454
#endif
430
455
#ifdef USE_SCTP
431
456
                                                case PROTO_SCTP:
509
534
                        ret=append_branch(msg, &a->val[0].u.str, &msg->dst_uri,
510
535
                                          &msg->path_vec, a->val[1].u.number,
511
536
                                          (flag_t)flags, msg->force_send_socket,
512
 
                                          0, 0);
 
537
                                          0, 0, 0, 0);
513
538
                        /* if the uri is the ruri and q was also not changed, mark
514
539
                           ruri as consumed, to avoid having an identical branch */
515
540
                        if ((a->val[0].u.str.s == 0 || a->val[0].u.str.len == 0) &&
1570
1595
        for (t=a; t!=0; t=t->next){
1571
1596
                if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0))
1572
1597
                        ms = TICKS_TO_MS(get_ticks_raw());
 
1598
                _cfg_crt_action = t;
1573
1599
                ret=do_action(h, t, msg);
 
1600
                _cfg_crt_action = 0;
1574
1601
                if(unlikely(cfg_get(core, core_cfg, latency_limit_action)>0)) {
1575
1602
                        ms = TICKS_TO_MS(get_ticks_raw()) - ms;
1576
1603
                        if(ms >= cfg_get(core, core_cfg, latency_limit_action)) {