[svn-commits] rmudgett: branch group/issue14292 r694 - /team/group/issue14292/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Tue Feb 3 17:44:33 CST 2009
Author: rmudgett
Date: Tue Feb 3 17:44:33 2009
New Revision: 694
URL: http://svn.digium.com/svn-view/libpri?view=rev&rev=694
Log:
Resolved conflicts and restarted automerge.
Merged revisions 692 via svnmerge from
https://origsvn.digium.com/svn/libpri/team/group/issue14068
........
r692 | rmudgett | 2009-02-03 16:26:14 -0600 (Tue, 03 Feb 2009) | 6 lines
* Made use new structs instead of new typdefs.
* Moved new COLP fields to the end of existing structures to
attempt to preserve ABI compatibility.
* Removed unused PRI_CONNECTED_LINE_UPDATE_SOURCE_DIVERSION.
* Added new PRI_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING.
........
Modified:
team/group/issue14292/ (props changed)
team/group/issue14292/libpri.h
team/group/issue14292/pri_facility.c
team/group/issue14292/q931.c
Propchange: team/group/issue14292/
------------------------------------------------------------------------------
automerge = *
Propchange: team/group/issue14292/
------------------------------------------------------------------------------
--- issue14292-integrated (original)
+++ issue14292-integrated Tue Feb 3 17:44:33 2009
@@ -1,1 +1,1 @@
-/team/group/issue14068:1-690
+/team/group/issue14068:1-693
Modified: team/group/issue14292/libpri.h
URL: http://svn.digium.com/svn-view/libpri/team/group/issue14292/libpri.h?view=diff&rev=694&r1=693&r2=694
==============================================================================
--- team/group/issue14292/libpri.h (original)
+++ team/group/issue14292/libpri.h Tue Feb 3 17:44:33 2009
@@ -344,8 +344,8 @@
enum PRI_CONNECTED_LINE_UPDATE_SOURCE {
PRI_CONNECTED_LINE_UPDATE_SOURCE_UNKNOWN, /* Update for unknown reason (May be interpreted to mean from answer) */
PRI_CONNECTED_LINE_UPDATE_SOURCE_ANSWER, /* Update from normal call answering */
- PRI_CONNECTED_LINE_UPDATE_SOURCE_DIVERSION, /* Update from call diversion */
- PRI_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER /* Update from call transfer */
+ PRI_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER, /* Update from call transfer(active) (Party has already answered) */
+ PRI_CONNECTED_LINE_UPDATE_SOURCE_TRANSFER_ALERTING /* Update from call transfer(alerting) (Party has not answered yet) */
};
/* Information needed to identify an endpoint in a call. */
@@ -361,7 +361,7 @@
struct pri_party_id id; /* Connected party ID */
int source; /* Information about the source of an update .
* enum PRI_CONNECTED_LINE_UPDATE_SOURCE values
- * for Normal-Answer, Call-transfer, Call-diversion */
+ * for Normal-Answer, Call-transfer */
};
/* Redirecting Line information.
@@ -377,20 +377,20 @@
/* Structures for qsig_cc_facilities */
struct qsig_cc_extension {
int cc_extension_tag;
- char extension[256];
+ char extension[256];
};
struct qsig_cc_optional_arg {
- char number_A[256];
- char number_B[256];
+ char number_A[256];
+ char number_B[256];
int service;
- struct qsig_cc_extension cc_extension;
+ struct qsig_cc_extension cc_extension;
};
struct qsig_cc_request_res {
int no_path_reservation;
int retain_service;
- struct qsig_cc_extension cc_extension;
+ struct qsig_cc_extension cc_extension;
};
/* Command derived from Facility */
@@ -408,71 +408,70 @@
#define CCERROR_REMOTE_USER_BUSY_AGAIN 1012
#define CCERROR_FAILURE_TO_MATCH 1013
-
-typedef struct cmd_connectedline {
+struct cmd_connectedline {
int e;
int channel;
q931_call *call;
struct pri_party_connected_line connected;
-} cmd_connectedline;
-
-typedef struct cmd_redirecting {
+};
+
+struct cmd_redirecting {
int e;
int channel;
q931_call *call;
struct pri_party_redirecting redirecting;
-} cmd_redirecting;
-
-typedef struct cmd_cc_ccbs_rr {
+};
+
+struct cmd_cc_ccbs_rr {
struct qsig_cc_request_res cc_request_res;
-} cmd_cc_ccbs_rr;
-
-typedef struct cmd_cc_ccnr_rr {
+};
+
+struct cmd_cc_ccnr_rr {
struct qsig_cc_request_res cc_request_res;
-} cmd_cc_ccnr_rr;
-
-typedef struct cmd_cc_cancel_inv {
+};
+
+struct cmd_cc_cancel_inv {
struct qsig_cc_optional_arg cc_optional_arg;
-} cmd_cc_cancel_inv;
-
-typedef struct cmd_cc_execposible_inv {
+};
+
+struct cmd_cc_execposible_inv {
struct qsig_cc_optional_arg cc_optional_arg;
-} cmd_cc_execposible_inv;
-
-typedef struct cmd_cc_suspend_inv {
+};
+
+struct cmd_cc_suspend_inv {
struct qsig_cc_extension cc_extension;
-} cmd_cc_suspend_inv;
-
-typedef struct cmd_cc_ringout_inv {
+};
+
+struct cmd_cc_ringout_inv {
struct qsig_cc_extension cc_extension;
-} cmd_cc_ringout_inv;
-
-typedef struct cmd_cc_error {
+};
+
+struct cmd_cc_error {
int error_value;
-} cmd_cc_error;
-
-typedef struct subcommand {
+};
+
+struct subcommand {
int cmd;
union {
- cmd_connectedline connectedline;
- cmd_redirecting redirecting;
- cmd_cc_ccbs_rr cc_ccbs_rr;
- cmd_cc_ccnr_rr cc_ccnr_rr;
- cmd_cc_cancel_inv cc_cancel_inv;
- cmd_cc_execposible_inv cc_execposible_inv;
- cmd_cc_suspend_inv cc_suspend_inv;
- cmd_cc_ringout_inv cc_ringout_inv;
- cmd_cc_error cc_error;
+ struct cmd_connectedline connectedline;
+ struct cmd_redirecting redirecting;
+ struct cmd_cc_ccbs_rr cc_ccbs_rr;
+ struct cmd_cc_ccnr_rr cc_ccnr_rr;
+ struct cmd_cc_cancel_inv cc_cancel_inv;
+ struct cmd_cc_execposible_inv cc_execposible_inv;
+ struct cmd_cc_suspend_inv cc_suspend_inv;
+ struct cmd_cc_ringout_inv cc_ringout_inv;
+ struct cmd_cc_error cc_error;
};
-} subcommand;
+};
/* Max number of subcommands per event message */
#define MAX_SUBCOMMANDS 4
-typedef struct subcommands {
+struct subcommands {
int counter_subcmd;
- subcommand subcmd[MAX_SUBCOMMANDS];
-} subcommands;
+ struct subcommand subcmd[MAX_SUBCOMMANDS];
+};
typedef struct pri_event_generic {
@@ -513,10 +512,10 @@
int progressmask;
q931_call *call;
char useruserinfo[260]; /* User->User info */
+ char connectednum[256];
+ char connectedname[256];
int connectedpres;
int connectedplan;
- char connectednum[256];
- char connectedname[256];
int source;
struct subcommands subcmds;
} pri_event_answer;
@@ -532,13 +531,13 @@
int callingplan; /* Dialing plan of Calling entity */
} pri_event_facname;
-typedef struct pri_event_facility {
+struct pri_event_facility {
int e;
int channel;
int cref;
q931_call *call;
struct subcommands subcmds;
-} pri_event_facility;
+};
#define PRI_CALLINGPLANANI
#define PRI_CALLINGPLANRDNIS
@@ -556,9 +555,7 @@
char callednum[256]; /* Called number */
char redirectingnum[256]; /* Redirecting number */
char redirectingname[256]; /* Redirecting name */
- int redirectingpres;
int redirectingreason; /* Reason for redirect */
- int redirectingcount;
int callingplanrdnis; /* Dialing plan of Redirecting Number */
char useruserinfo[260]; /* User->User info */
int flexible; /* Are we flexible with our channel selection? */
@@ -574,6 +571,8 @@
char origcallednum[256];
int callingplanorigcalled; /* Dialing plan of Originally Called Number */
int origredirectingreason;
+ int redirectingpres;
+ int redirectingcount;
struct subcommands subcmds;
} pri_event_ring;
@@ -638,7 +637,7 @@
pri_event_setup_ack setup_ack; /* SETUP_ACKNOWLEDGE structure */
pri_event_notify notify; /* Notification */
pri_event_keypad_digit digit; /* Digits that come during a call */
- pri_event_facility facility;
+ struct pri_event_facility facility;
} pri_event;
struct pri;
Modified: team/group/issue14292/pri_facility.c
URL: http://svn.digium.com/svn-view/libpri/team/group/issue14292/pri_facility.c?view=diff&rev=694&r1=693&r2=694
==============================================================================
--- team/group/issue14292/pri_facility.c (original)
+++ team/group/issue14292/pri_facility.c Tue Feb 3 17:44:33 2009
@@ -3947,7 +3947,7 @@
}
-static subcommand *get_ptr_subcommand(subcommands *sub)
+static struct subcommand *get_ptr_subcommand(struct subcommands *sub)
{
if (sub->counter_subcmd < MAX_SUBCOMMANDS) {
int count = sub->counter_subcmd;
Modified: team/group/issue14292/q931.c
URL: http://svn.digium.com/svn-view/libpri/team/group/issue14292/q931.c?view=diff&rev=694&r1=693&r2=694
==============================================================================
--- team/group/issue14292/q931.c (original)
+++ team/group/issue14292/q931.c Tue Feb 3 17:44:33 2009
@@ -1003,8 +1003,7 @@
prefix, ie->data[2] >> 7, redirection_reason2str(ie->data[2] & 0x7f), ie->data[2] & 0x7f);
break;
}
- }
- while(!(ie->data[i++]& 0x80));
+ } while(!(ie->data[i++]& 0x80));
q931_get_number(cnum, sizeof(cnum), ie->data + i, ie->len - i);
pri_message(pri, " '%s' ]\n", cnum);
}
@@ -1024,8 +1023,7 @@
call->connectedpres = ie->data[i] & 0x7f;
break;
}
- }
- while(!(ie->data[i++] & 0x80));
+ } while(!(ie->data[i++] & 0x80));
q931_get_number((unsigned char *) call->connectednum, sizeof(call->connectednum), ie->data + i, ie->len - i);
return 0;
@@ -1061,8 +1059,7 @@
prefix, ie->data[1] >> 7, pri_pres2str(ie->data[1] & 0x7f), ie->data[1] & 0x7f);
break;
}
- }
- while(!(ie->data[i++]& 0x80));
+ } while(!(ie->data[i++]& 0x80));
q931_get_number(cnum, sizeof(cnum), ie->data + i, ie->len - i);
pri_message(pri, " '%s' ]\n", cnum);
}
@@ -1086,8 +1083,7 @@
call->redirectingreason = ie->data[i] & 0x0f;
break;
}
- }
- while(!(ie->data[i++] & 0x80));
+ } while(!(ie->data[i++] & 0x80));
q931_get_number((unsigned char *) call->redirectingnum, sizeof(call->redirectingnum), ie->data + i, ie->len - i);
return 0;
}
@@ -2524,8 +2520,7 @@
maxlen -= res;
iet = (q931_ie *)((char *)iet + res);
}
- }
- while (res > 0 && order < ies_count);
+ } while (res > 0 && order < ies_count);
if (have_shift && total_res) {
if (Q931_IE_CODESET(ies[x].ie))
*codeset = Q931_IE_CODESET(ies[x].ie);
@@ -3349,12 +3344,12 @@
return 0;
}
-static void clr_subcommands(subcommands *sub)
+static void clr_subcommands(struct subcommands *sub)
{
sub->counter_subcmd = 0;
}
-static subcommand *get_ptr_subcommand(subcommands *sub)
+static struct subcommand *get_ptr_subcommand(struct subcommands *sub)
{
if (sub->counter_subcmd < MAX_SUBCOMMANDS) {
int count = sub->counter_subcmd;
@@ -3365,7 +3360,7 @@
return NULL;
}
-static subcommand *get_ptr_q931_subcommand_by_index(subcommands *sub, int index)
+static struct subcommand *get_ptr_q931_subcommand_by_index(struct subcommands *sub, int index)
{
if (index < MAX_SUBCOMMANDS) {
sub->counter_subcmd--;
@@ -3375,7 +3370,7 @@
return NULL;
}
-static int q931_facilities2eventfacilities(struct pri *pri, q931_call *c, subcommands *subcmds)
+static int q931_facilities2eventfacilities(struct pri *pri, q931_call *c, struct subcommands *subcmds)
{
int facilitypos;
int facility_number;
@@ -3952,7 +3947,7 @@
if (c->ctcompletecallstatus == 0) {
/* answered(0) */
- subcommand *subcmd;
+ struct subcommand *subcmd;
pri_message(pri, "Got CT-Complete, callStatus = answered(0)\n");
pri->ev.e = PRI_EVENT_FACILITY;
@@ -3961,8 +3956,9 @@
subcmd = get_ptr_subcommand(&pri->ev.facility.subcmds);
if (subcmd) {
+ struct cmd_connectedline *cmdcl = &subcmd->connectedline;
+
subcmd->cmd = CMD_CONNECTEDLINE;
- cmd_connectedline *cmdcl = &subcmd->connectedline;
libpri_copy_string(cmdcl->connected.id.number, c->ctcompletenum, sizeof(cmdcl->connected.id.number));
libpri_copy_string(cmdcl->connected.id.name, c->ctcompletename, sizeof(cmdcl->connected.id.name));
cmdcl->connected.id.number_type = c->ctcompleteplan;
@@ -3973,7 +3969,7 @@
}
} else if (c->ctcompletecallstatus == 1) {
/* alerting(1) */
- subcommand *subcmd;
+ struct subcommand *subcmd;
pri_message(pri, "Got CT-Complete, callStatus = alerting(1)\n");
pri->ev.e = PRI_EVENT_FACILITY;
@@ -3982,8 +3978,9 @@
subcmd = get_ptr_subcommand(&pri->ev.facility.subcmds);
if (subcmd) {
+ struct cmd_redirecting *cmdr = &subcmd->redirecting;
+
subcmd->cmd = CMD_REDIRECTING;
- cmd_redirecting *cmdr = &subcmd->redirecting;
libpri_copy_string(cmdr->redirecting.from.number, c->connectednum, sizeof(cmdr->redirecting.from.number));
libpri_copy_string(cmdr->redirecting.from.name, c->connectedname, sizeof(cmdr->redirecting.from.name));
cmdr->redirecting.from.number_type = c->connectedplan;
@@ -4001,7 +3998,8 @@
pri_message(pri, "illegal value for callStatus=%d\n", c->ctcompletecallstatus);
}
} else if (c->ctactiveflag) {
- subcommand *subcmd;
+ struct subcommand *subcmd;
+
c->ctactiveflag = 0;
pri_message(pri, "Got CT-Active\n");
@@ -4011,8 +4009,9 @@
subcmd = get_ptr_subcommand(&pri->ev.facility.subcmds);
if (subcmd) {
+ struct cmd_connectedline *cmdcl = &subcmd->connectedline;
+
subcmd->cmd = CMD_CONNECTEDLINE;
- cmd_connectedline *cmdcl = &subcmd->connectedline;
libpri_copy_string(cmdcl->connected.id.number, c->ctcompletenum, sizeof(cmdcl->connected.id.number));
libpri_copy_string(cmdcl->connected.id.name, c->ctcompletename, sizeof(cmdcl->connected.id.name));
cmdcl->connected.id.number_type = c->ctcompleteplan;
@@ -4023,7 +4022,8 @@
}
}
else if (c->divleginfo1activeflag) {
- subcommand *subcmd;
+ struct subcommand *subcmd;
+
c->divleginfo1activeflag = 0;
pri_message(pri, "Got DivertingLegInformation1\n");
@@ -4033,8 +4033,9 @@
subcmd = get_ptr_subcommand(&pri->ev.facility.subcmds);
if (subcmd) {
+ struct cmd_redirecting *cmdr = &subcmd->redirecting;
+
subcmd->cmd = CMD_REDIRECTING;
- cmd_redirecting *cmdr = &subcmd->redirecting;
libpri_copy_string(cmdr->redirecting.from.number, c->callednum, sizeof(cmdr->redirecting.from.number));
cmdr->redirecting.from.name[0] = '\0';
cmdr->redirecting.from.number_type = c->calledplan;
More information about the svn-commits
mailing list