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