All pastes #1238 Raw Edit

Anonymous

public text v1 · immutable
#1238 ·published 2004-10-03 20:51 UTC
rendered paste body
		/* find the beginning bracket */
		p = strchr(chan->callerid, '<');
		if (p) {
			p++;

			/* find the ending bracket */
			e = strchr(p, '>');
		}

		/* if there's ending, copy the value */
		if (e) {
			len = e-p;
			account->callerid = malloc(len + 1);
			strncpy(account->callerid, p, len);
			account->callerid[len] = '\0';
		}
		else {
			account->callerid = chan->callerid;
		}