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

« back to all changes in this revision

Viewing changes to modules/pv/pv_branch.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:
40
40
        str path;
41
41
        unsigned int fl = 0;
42
42
        struct socket_info* fsocket = NULL;
 
43
        str ruid;
 
44
        str location_ua;
43
45
 
44
46
        /* get the index */
45
47
        if(pv_get_spec_index(msg, param, &idx, &idxf)!=0)
48
50
                return pv_get_null(msg, param, res);
49
51
        }
50
52
 
51
 
        uri.s = get_branch(idx, &uri.len, &lq, &duri, &path, &fl, &fsocket);
 
53
        uri.s = get_branch(idx, &uri.len, &lq, &duri, &path, &fl, &fsocket, &ruid, 0, &location_ua);
52
54
 
53
55
        /* branch(count) doesn't need a valid branch, everything else does */
54
56
        if(uri.s == 0 && ( param->pvn.u.isname.name.n != 5/* count*/ ))
79
81
                        return pv_get_uintval(msg, param, res, nr_branches);
80
82
                case 6: /* flags */
81
83
                        return pv_get_uintval(msg, param, res, fl);
 
84
                case 7: /* ruid */
 
85
                        if(ruid.len==0)
 
86
                                return pv_get_null(msg, param, res);
 
87
                        return pv_get_strval(msg, param, res, &ruid);
 
88
                case 8: /* location_ua */
 
89
                        if(location_ua.len==0)
 
90
                                return pv_get_null(msg, param, res);
 
91
                        return pv_get_strval(msg, param, res, &location_ua);
82
92
                default:
83
93
                        /* 0 - uri */
84
94
                        return pv_get_strval(msg, param, res, &uri);
245
255
                        }
246
256
                        br->flags = val->ri;
247
257
                break;
 
258
                case 7: /* ruid */
 
259
                        /* do nothing - cannot set the ruid */
 
260
                break;
 
261
                case 8: /* location_ua */
 
262
                        /* do nothing - cannot set the location_ua */
 
263
                break;
248
264
                default:
249
265
                        /* 0 - uri */
250
266
                        if(val==NULL || (val->flags&PV_VAL_NULL))
296
312
                case 4: 
297
313
                        if(strncmp(in->s, "path", 4)==0)
298
314
                                sp->pvp.pvn.u.isname.name.n = 2;
 
315
                        else if (strncmp(in->s, "ruid", 4)==0)
 
316
                                sp->pvp.pvn.u.isname.name.n = 7;
299
317
                        else goto error;
300
318
                break;
301
319
                case 1: 
306
324
                case 11: 
307
325
                        if(strncmp(in->s, "send_socket", 11)==0)
308
326
                                sp->pvp.pvn.u.isname.name.n = 4;
 
327
                        else if(strncmp(in->s, "location_ua", 11)==0)
 
328
                                sp->pvp.pvn.u.isname.name.n = 8;
309
329
                        else goto error;
310
330
                break;
311
331
                case 5: