uniqueid: Fix chan_dahdi, sig_pri, sig_ss7, test_cdr, and test_cel compiler errors.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 7 Mar 2014 19:19:04 +0000 (19:19 +0000)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 7 Mar 2014 19:19:04 +0000 (19:19 +0000)
(issue ASTERISK-23120)
........

Merged revisions 410171 from http://svn.asterisk.org/svn/asterisk/branches/12

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

channels/chan_dahdi.c
channels/sig_pri.c
channels/sig_pri.h
channels/sig_ss7.c
channels/sig_ss7.h
include/asterisk/bridge.h
tests/test_cdr.c
tests/test_cel.c

index fb5877f..ef2f19e 100644 (file)
@@ -969,7 +969,9 @@ static struct dahdi_chan_conf dahdi_chan_conf_default(void)
 }
 
 
-static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause);
+static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
+       const char *data, int *cause);
 static int dahdi_digit_begin(struct ast_channel *ast, char digit);
 static int dahdi_digit_end(struct ast_channel *ast, char digit, unsigned int duration);
 static int dahdi_sendtext(struct ast_channel *c, const char *text);
@@ -2129,7 +2131,9 @@ static int dahdi_setlaw(int dfd, int law)
 #endif /* defined(HAVE_PRI) || defined(HAVE_SS7) */
 
 #if defined(HAVE_PRI)
-static struct ast_channel *my_new_pri_ast_channel(void *pvt, int state, enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
+static struct ast_channel *my_new_pri_ast_channel(void *pvt, int state,
+       enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids,
+       const struct ast_channel *requestor)
 {
        struct dahdi_pvt *p = pvt;
        int audio;
@@ -13161,7 +13165,9 @@ static struct dahdi_pvt *determine_starting_point(const char *data, struct dahdi
        return p;
 }
 
-static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap, const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor, const char *data, int *cause)
+static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap *cap,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
+       const char *data, int *cause)
 {
        int callwait = 0;
        struct dahdi_pvt *p;
@@ -13255,11 +13261,11 @@ static struct ast_channel *dahdi_request(const char *type, struct ast_format_cap
 
                                sig_pri_extract_called_num_subaddr(p->sig_pvt, data, p->dnid,
                                        sizeof(p->dnid));
-                               tmp = sig_pri_request(p->sig_pvt, SIG_PRI_DEFLAW, requestor, transcapdigital);
+                               tmp = sig_pri_request(p->sig_pvt, SIG_PRI_DEFLAW, assignedids, requestor, transcapdigital);
 #endif
 #if defined(HAVE_SS7)
                        } else if (p->sig == SIG_SS7) {
-                               tmp = sig_ss7_request(p->sig_pvt, SIG_SS7_DEFLAW, requestor, transcapdigital);
+                               tmp = sig_ss7_request(p->sig_pvt, SIG_SS7_DEFLAW, assignedids, requestor, transcapdigital);
 #endif /* defined(HAVE_SS7) */
                        } else {
                                tmp = dahdi_new(p, AST_STATE_RESERVED, 0, p->owner ? SUB_CALLWAIT : SUB_REAL, 0, assignedids, requestor, callid);
index 33751dd..def6555 100644 (file)
@@ -1028,12 +1028,14 @@ static int sig_pri_play_tone(struct sig_pri_chan *p, enum sig_pri_tone tone)
        }
 }
 
-static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state, int ulaw, int transfercapability, char *exten, const struct ast_channel *requestor)
+static struct ast_channel *sig_pri_new_ast_channel(struct sig_pri_chan *p, int state,
+       int ulaw, int transfercapability, char *exten,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
 {
        struct ast_channel *c;
 
        if (sig_pri_callbacks.new_ast_channel) {
-               c = sig_pri_callbacks.new_ast_channel(p->chan_pvt, state, ulaw, exten, requestor);
+               c = sig_pri_callbacks.new_ast_channel(p->chan_pvt, state, ulaw, exten, assignedids, requestor);
        } else {
                return NULL;
        }
@@ -1098,14 +1100,17 @@ static void sig_pri_ami_channel_event(struct sig_pri_chan *p)
        }
 }
 
-struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability)
+struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
+       int transfercapability)
 {
        struct ast_channel *ast;
 
        ast_debug(1, "%s %d\n", __FUNCTION__, p->channel);
 
        sig_pri_set_outgoing(p, 1);
-       ast = sig_pri_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability, p->exten, requestor);
+       ast = sig_pri_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability,
+               p->exten, assignedids, requestor);
        if (!ast) {
                sig_pri_set_outgoing(p, 0);
        }
@@ -5859,7 +5864,7 @@ static void *pri_dchannel(void *vpri)
                                         */
                                        sig_pri_lock_private(pri->pvts[nextidle]);
                                        sig_pri_unlock_private(pri->pvts[nextidle]);
-                                       idle = sig_pri_request(pri->pvts[nextidle], AST_FORMAT_ULAW, NULL, 0);
+                                       idle = sig_pri_request(pri->pvts[nextidle], AST_FORMAT_ULAW, NULL, NULL, 0);
                                        ast_mutex_lock(&pri->lock);
                                        if (idle) {
                                                pri->pvts[nextidle]->isidlecall = 1;
@@ -6470,7 +6475,7 @@ static void *pri_dchannel(void *vpri)
                                                ast_mutex_unlock(&pri->lock);
                                                c = sig_pri_new_ast_channel(pri->pvts[chanpos],
                                                        AST_STATE_RESERVED, law, e->ring.ctype,
-                                                       pri->pvts[chanpos]->exten, NULL);
+                                                       pri->pvts[chanpos]->exten, NULL, NULL);
                                                ast_mutex_lock(&pri->lock);
                                                sig_pri_lock_private(pri->pvts[chanpos]);
                                                if (c) {
@@ -6593,7 +6598,7 @@ static void *pri_dchannel(void *vpri)
                                                ast_mutex_unlock(&pri->lock);
                                                c = sig_pri_new_ast_channel(pri->pvts[chanpos],
                                                        AST_STATE_RING, law, e->ring.ctype,
-                                                       pri->pvts[chanpos]->exten, NULL);
+                                                       pri->pvts[chanpos]->exten, NULL, NULL);
                                                ast_mutex_lock(&pri->lock);
                                                sig_pri_lock_private(pri->pvts[chanpos]);
                                                if (c) {
index 09fa920..ad6c4c5 100644 (file)
@@ -192,7 +192,9 @@ struct sig_pri_callback {
        int (* const train_echocanceller)(void *pvt);
        int (* const dsp_reset_and_flush_digits)(void *pvt);
 
-       struct ast_channel * (* const new_ast_channel)(void *pvt, int state, enum sig_pri_law law, char *exten, const struct ast_channel *chan);
+       struct ast_channel * (* const new_ast_channel)(void *pvt, int state,
+               enum sig_pri_law law, char *exten, const struct ast_assigned_ids *assignedids,
+               const struct ast_channel *requestor);
 
        void (* const fixup_chans)(void *old_chan, void *new_chan);
 
@@ -667,7 +669,9 @@ int sig_pri_is_alarm_ignored(struct sig_pri_span *pri);
 void pri_event_alarm(struct sig_pri_span *pri, int index, int before_start_pri);
 void pri_event_noalarm(struct sig_pri_span *pri, int index, int before_start_pri);
 
-struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law, const struct ast_channel *requestor, int transfercapability);
+struct ast_channel *sig_pri_request(struct sig_pri_chan *p, enum sig_pri_law law,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
+       int transfercapability);
 
 struct sig_pri_chan *sig_pri_chan_new(void *pvt_data, struct sig_pri_span *pri, int logicalspan, int channo, int trunkgroup);
 void sig_pri_chan_delete(struct sig_pri_chan *doomed);
index 905d79b..2e39189 100644 (file)
@@ -258,12 +258,15 @@ static void sig_ss7_loopback(struct sig_ss7_chan *p, int enable)
        }
 }
 
-static struct ast_channel *sig_ss7_new_ast_channel(struct sig_ss7_chan *p, int state, int ulaw, int transfercapability, char *exten, const struct ast_channel *requestor)
+static struct ast_channel *sig_ss7_new_ast_channel(struct sig_ss7_chan *p, int state,
+       int ulaw, int transfercapability, char *exten,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor)
 {
        struct ast_channel *ast;
 
        if (sig_ss7_callbacks.new_ast_channel) {
-               ast = sig_ss7_callbacks.new_ast_channel(p->chan_pvt, state, ulaw, exten, requestor);
+               ast = sig_ss7_callbacks.new_ast_channel(p->chan_pvt, state, ulaw, exten,
+                       assignedids, requestor);
        } else {
                return NULL;
        }
@@ -604,7 +607,7 @@ static void ss7_start_call(struct sig_ss7_chan *p, struct sig_ss7_linkset *links
         */
        ast_mutex_unlock(&linkset->lock);
        sig_ss7_unlock_private(p);
-       c = sig_ss7_new_ast_channel(p, AST_STATE_RING, law, 0, p->exten, NULL);
+       c = sig_ss7_new_ast_channel(p, AST_STATE_RING, law, 0, p->exten, NULL, NULL);
        if (!c) {
                ast_log(LOG_WARNING, "Unable to start PBX on CIC %d\n", p->cic);
                ast_mutex_lock(&linkset->lock);
@@ -1889,7 +1892,9 @@ int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condi
  * \retval ast_channel on success.
  * \retval NULL on error.
  */
-struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law, const struct ast_channel *requestor, int transfercapability)
+struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
+       int transfercapability)
 {
        struct ast_channel *ast;
 
@@ -1901,7 +1906,8 @@ struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law
        }
 
        sig_ss7_set_outgoing(p, 1);
-       ast = sig_ss7_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability, p->exten, requestor);
+       ast = sig_ss7_new_ast_channel(p, AST_STATE_RESERVED, law, transfercapability,
+               p->exten, assignedids, requestor);
        if (!ast) {
                sig_ss7_set_outgoing(p, 0);
 
index 6b62d85..56d393c 100644 (file)
@@ -135,7 +135,9 @@ struct sig_ss7_callback {
        int (* const set_echocanceller)(void *pvt, int enable);
        void (* const set_loopback)(void *pvt, int enable);
 
-       struct ast_channel * (* const new_ast_channel)(void *pvt, int state, enum sig_ss7_law law, char *exten, const struct ast_channel *requestor);
+       struct ast_channel * (* const new_ast_channel)(void *pvt, int state,
+               enum sig_ss7_law law, char *exten, const struct ast_assigned_ids *assignedids,
+               const struct ast_channel *requestor);
        int (* const play_tone)(void *pvt, enum sig_ss7_tone tone);
 
        void (* const handle_link_exception)(struct sig_ss7_linkset *linkset, int which);
@@ -290,7 +292,9 @@ int sig_ss7_hangup(struct sig_ss7_chan *p, struct ast_channel *ast);
 int sig_ss7_answer(struct sig_ss7_chan *p, struct ast_channel *ast);
 void sig_ss7_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, struct sig_ss7_chan *pchan);
 int sig_ss7_indicate(struct sig_ss7_chan *p, struct ast_channel *chan, int condition, const void *data, size_t datalen);
-struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law, const struct ast_channel *requestor, int transfercapability);
+struct ast_channel *sig_ss7_request(struct sig_ss7_chan *p, enum sig_ss7_law law,
+       const struct ast_assigned_ids *assignedids, const struct ast_channel *requestor,
+       int transfercapability);
 void sig_ss7_chan_delete(struct sig_ss7_chan *doomed);
 struct sig_ss7_chan *sig_ss7_chan_new(void *pvt_data, struct sig_ss7_linkset *ss7);
 void sig_ss7_init_linkset(struct sig_ss7_linkset *ss7);
index d8c27f4..8768fe1 100644 (file)
@@ -333,7 +333,7 @@ extern struct ast_bridge_methods ast_bridge_base_v_table;
  * \param flags Flags that will alter the behavior of the bridge
  * \param creator Entity that created the bridge (optional)
  * \param name Name given to the bridge by its creator (optional, requires named creator)
- * \param name id Unique ID given to the bridge by its creator (optional)
+ * \param id Unique ID given to the bridge by its creator (optional)
  *
  * \retval a pointer to a new bridge on success
  * \retval NULL on failure
index ce21151..1b484d8 100644 (file)
@@ -2066,7 +2066,7 @@ AST_TEST_DEFINE(test_cdr_park)
        bridge = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_HOLDING,
                AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
                        | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED,
-               "test_cdr", "test_cdr_park");
+               "test_cdr", "test_cdr_park", NULL);
        ast_test_validate(test, bridge != NULL);
 
        do_sleep(&to_sleep);
index e1cf928..de69008 100644 (file)
@@ -1334,7 +1334,7 @@ AST_TEST_DEFINE(test_cel_attended_transfer_bridges_merge)
        /* Create first set of bridged parties */
        bridge1 = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_1TO1MIX | AST_BRIDGE_CAPABILITY_NATIVE | AST_BRIDGE_CAPABILITY_MULTIMIX,
                AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED | AST_BRIDGE_FLAG_SMART,
-               "test_cel", "test_cel_atxfer_bridges_merge_1");
+               "test_cel", "test_cel_atxfer_bridges_merge_1", NULL);
        ast_test_validate(test, bridge1 != NULL);
 
        CREATE_ALICE_CHANNEL(chan_alice, &alice_caller);
@@ -1348,7 +1348,7 @@ AST_TEST_DEFINE(test_cel_attended_transfer_bridges_merge)
        /* Create second set of bridged parties */
        bridge2 = ast_bridge_base_new(AST_BRIDGE_CAPABILITY_1TO1MIX | AST_BRIDGE_CAPABILITY_NATIVE | AST_BRIDGE_CAPABILITY_MULTIMIX,
                AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED | AST_BRIDGE_FLAG_SMART,
-               "test_cel", "test_cel_atxfer_bridges_merge_2");
+               "test_cel", "test_cel_atxfer_bridges_merge_2", NULL);
        ast_test_validate(test, bridge2 != NULL);
 
        CREATE_DAVID_CHANNEL(chan_david, &david_caller);
@@ -1417,7 +1417,7 @@ AST_TEST_DEFINE(test_cel_attended_transfer_bridges_link)
                AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
                | AST_BRIDGE_FLAG_SWAP_INHIBIT_TO | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM
                | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED | AST_BRIDGE_FLAG_SMART,
-               "test_cel", "test_cel_atxfer_bridges_link_1");
+               "test_cel", "test_cel_atxfer_bridges_link_1", NULL);
        ast_test_validate(test, bridge1 != NULL);
 
        CREATE_ALICE_CHANNEL(chan_alice, &alice_caller);
@@ -1433,7 +1433,7 @@ AST_TEST_DEFINE(test_cel_attended_transfer_bridges_link)
                AST_BRIDGE_FLAG_MERGE_INHIBIT_TO | AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM
                | AST_BRIDGE_FLAG_SWAP_INHIBIT_TO | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM
                | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED | AST_BRIDGE_FLAG_SMART,
-               "test_cel", "test_cel_atxfer_bridges_link_2");
+               "test_cel", "test_cel_atxfer_bridges_link_2", NULL);
        ast_test_validate(test, bridge2 != NULL);
 
        CREATE_DAVID_CHANNEL(chan_david, &david_caller);