· 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
Put your trust in those who are worthy.


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.0036 sec