Change intializer types. Found while working on asterisk-cpp. I have a new
authorSean Bright <sean@malleable.com>
Sat, 17 Jan 2009 02:52:30 +0000 (02:52 +0000)
committerSean Bright <sean@malleable.com>
Sat, 17 Jan 2009 02:52:30 +0000 (02:52 +0000)
favorite error message from g++:

    pbx_dundi.c:4580: sorry, unimplemented: non-trivial designated
                      initializers not supported

I like it when compilers are apologetic.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169116 65c4cc65-6c06-0410-ace0-fbb531ad65f3

pbx/pbx_dundi.c

index ed4d20e..517a3e2 100644 (file)
@@ -4569,14 +4569,13 @@ static int dundi_matchmore(struct ast_channel *chan, const char *context, const
        return dundi_helper(chan, context, exten, priority, data, DUNDI_FLAG_MATCHMORE);
 }
 
        return dundi_helper(chan, context, exten, priority, data, DUNDI_FLAG_MATCHMORE);
 }
 
-static struct ast_switch dundi_switch =
-{
-        name:                   "DUNDi",
-        description:                   "DUNDi Discovered Dialplan Switch",
-        exists:                 dundi_exists,
-        canmatch:               dundi_canmatch,
-        exec:                   dundi_exec,
-        matchmore:              dundi_matchmore,
+static struct ast_switch dundi_switch = {
+       .name        = "DUNDi",
+       .description = "DUNDi Discovered Dialplan Switch",
+       .exists      = dundi_exists,
+       .canmatch    = dundi_canmatch,
+       .exec        = dundi_exec,
+       .matchmore   = dundi_matchmore,
 };
 
 static int set_config(char *config_file, struct sockaddr_in* sin, int reload)
 };
 
 static int set_config(char *config_file, struct sockaddr_in* sin, int reload)