MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / parse_groupname

Function parse_groupname

modules/statistics/stats_funcs.c:117–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117void parse_groupname(const str *in, str *out_grp, str *out_name)
118{
119 char *p, *lim = in->s + in->len;
120
121 for (p = in->s; *p != STAT_GROUP_DELIM && p < lim; p++) {}
122
123 if (p >= lim) {
124 out_grp->s = NULL;
125 out_grp->len = 0;
126 *out_name = *in;
127 } else {
128 out_grp->s = in->s;
129 out_grp->len = p - in->s;
130 out_name->s = p + 1;
131 out_name->len = in->len - (out_name->s - in->s);
132 }
133
134 LM_DBG("group: '%.*s', name: '%.*s'\n", out_grp->len, out_grp->s,
135 out_name->len, out_name->s);
136}
137
138
139

Callers 1

resolve_statFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected