Skip to content

Commit

Permalink
pv: several new $E... variables for punctuation signs
Browse files Browse the repository at this point in the history
- facilitate using them in params (e.g., for transformations)
  • Loading branch information
miconda committed Jun 27, 2024
1 parent 7061a79 commit dc7fc82
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/modules/pv/pv.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,20 @@ static pv_export_t mod_pvs[] = {
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 4},
{{"Et", (sizeof("Et") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 3},
{{"Ec", (sizeof("Ec") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 5},
{{"Eq", (sizeof("Eq") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 6},
{{"Ek", (sizeof("Ek") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 7},
{{"Ei", (sizeof("Ei") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 8},
{{"Ej", (sizeof("Ej") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 9},
{{"Eb", (sizeof("Eb") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 10},
{{"Ev", (sizeof("Ev") - 1)}, /* */
PVT_OTHER, pv_get_escstr, 0, 0, 0, pv_init_iname, 11},
{{"fd", (sizeof("fd") - 1)}, /* */
PVT_OTHER, pv_get_from_attr, pv_set_from_domain, 0, 0,
pv_init_iname, 3},
Expand Down
21 changes: 21 additions & 0 deletions src/modules/pv/pv_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1510,6 +1510,27 @@ int pv_get_escstr(struct sip_msg *msg, pv_param_t *param, pv_value_t *res)
case 4:
_pv_escstr[i] = ' ';
break;
case 5:
_pv_escstr[i] = ',';
break;
case 6:
_pv_escstr[i] = '"';
break;
case 7:
_pv_escstr[i] = '\'';
break;
case 8:
_pv_escstr[i] = ':';
break;
case 9:
_pv_escstr[i] = ';';
break;
case 10:
_pv_escstr[i] = '\\';
break;
case 11:
_pv_escstr[i] = '`';
break;
default:
_pv_escstr[i] = '\n';
break;
Expand Down

0 comments on commit dc7fc82

Please sign in to comment.