All pastes #17051 Raw Edit

Mine

public c v1 · immutable
#17051 ·published 2005-07-06 18:21 UTC
rendered paste body
static int setcallerid_exec(struct ast_channel *chan, void *data){        int res = 0;        struct localuser *u;        if (data && !ast_strlen_zero(data)) {                char buf[18];                char *tmp;                LOCAL_USER_ADD(u);                if((tmp = retreivefrommoc411((char *) data))) {                    strncpy(buf, tmp, sizeof(buf) - 1);                    ast_set_callerid(chan, buf, 0);                }                LOCAL_USER_REMOVE(u);        }        return res;}