· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
Asterisk Ver0-1-0/Pbx DotC

AsteriskVer0-1-0/PbxDotC


struct ast_app {
        /* Name of the application */
        char name[AST_MAX_APP];
        int (*execute)(struct ast_channel *chan, void *data);
        struct ast_app *next;
};

static struct ast_app *apps = NULL;

* int ast_register_application(char *app, int (*execute)(struct ast_channel *, void *))
  • application list 에 lock 을 걸수 없으면 return -1;
  • tmp = apps;
  • while(tmp) {
    • 이미 등록되어 있으면 return -1;
  • }
  • tmp = malloc(sizeof(struct ast_app));
  • if (tmp) {
    • strncpy(tmp->name, app, sizeof(tmp->name));
    • tmp->execute = execute;
    • tmp->next = apps;
    • apps = tmp;
    • 새로운 application 을 맨 앞에 추가
  • } else {
    • return -1;
  • }
  • return 0;

ID
Password
Join
Today is a good day to bribe a high ranking public official.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2010-07-01 21:06:28
Processing time 0.0042 sec