Merge "res_musiconhold: Start playlist after initial announcement"
[asterisk/asterisk.git] / apps / app_url.c
index af72b44..185712d 100644 (file)
  * 
  * \ingroup applications
  */
+
+/*** MODULEINFO
+       <support_level>extended</support_level>
+ ***/
  
 #include "asterisk.h"
 
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
 #include "asterisk/pbx.h"
 #include "asterisk/module.h"
 #include "asterisk/app.h"
@@ -82,22 +84,22 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
 static char *app = "SendURL";
 
-enum {
+enum option_flags {
        OPTION_WAIT = (1 << 0),
-} option_flags;
+};
 
 AST_APP_OPTIONS(app_opts,{
        AST_APP_OPTION('w', OPTION_WAIT),
 });
 
-static int sendurl_exec(struct ast_channel *chan, void *data)
+static int sendurl_exec(struct ast_channel *chan, const char *data)
 {
        int res = 0;
        char *tmp;
        struct ast_frame *f;
        char *status = "FAILURE";
        char *opts[0];
-       struct ast_flags flags;
+       struct ast_flags flags = { 0 };
        AST_DECLARE_APP_ARGS(args,
                AST_APP_ARG(url);
                AST_APP_ARG(options);
@@ -139,7 +141,7 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
                                break;
                        }
                        if (f->frametype == AST_FRAME_HTML) {
-                               switch(f->subclass) {
+                               switch (f->subclass.integer) {
                                case AST_HTML_LDCOMPLETE:
                                        res = 0;
                                        ast_frfree(f);
@@ -154,7 +156,7 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
                                        goto out;
                                        break;
                                default:
-                                       ast_log(LOG_WARNING, "Don't know what to do with HTML subclass %d\n", f->subclass);
+                                       ast_log(LOG_WARNING, "Don't know what to do with HTML subclass %d\n", f->subclass.integer);
                                };
                        }
                        ast_frfree(f);
@@ -175,4 +177,5 @@ static int load_module(void)
        return ast_register_application_xml(app, sendurl_exec);
 }
 
-AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Send URL Applications");
+AST_MODULE_INFO_STANDARD_EXTENDED(ASTERISK_GPL_KEY, "Send URL Applications");
+