== 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;