[libpri-commits] rmudgett: branch rmudgett/t312 r2217 - /team/rmudgett/t312/
SVN commits to the libpri project
libpri-commits at lists.digium.com
Fri Feb 25 11:42:15 CST 2011
Author: rmudgett
Date: Fri Feb 25 11:42:09 2011
New Revision: 2217
URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2217
Log:
Add call and cc_record debug to pri_dump_info_str().
Modified:
team/rmudgett/t312/pri.c
team/rmudgett/t312/pri_cc.c
team/rmudgett/t312/pri_internal.h
team/rmudgett/t312/q931.c
Modified: team/rmudgett/t312/pri.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/t312/pri.c?view=diff&rev=2217&r1=2216&r2=2217
==============================================================================
--- team/rmudgett/t312/pri.c (original)
+++ team/rmudgett/t312/pri.c Fri Feb 25 11:42:09 2011
@@ -1744,14 +1744,6 @@
used = pri_snprintf(buf, used, buf_size, "Q921 Outstanding: %u (TEI=%d)\n",
q921outstanding, link->tei);
}
-#if 0
- used = pri_snprintf(buf, used, buf_size, "Window Length: %d/%d\n",
- ctrl->timers[PRI_TIMER_K], ctrl->window);
- used = pri_snprintf(buf, used, buf_size, "Sentrej: %d\n", ctrl->sentrej);
- used = pri_snprintf(buf, used, buf_size, "SolicitFbit: %d\n", ctrl->solicitfbit);
- used = pri_snprintf(buf, used, buf_size, "Retrans: %d\n", ctrl->retrans);
- used = pri_snprintf(buf, used, buf_size, "Busy: %d\n", ctrl->busy);
-#endif
used = pri_snprintf(buf, used, buf_size, "Overlap Dial: %d\n", ctrl->overlapdial);
used = pri_snprintf(buf, used, buf_size, "Logical Channel Mapping: %d\n",
ctrl->chan_mapping_logical);
@@ -1768,6 +1760,38 @@
}
}
}
+#define DEBUG_CALL_RECORDS
+#if defined(DEBUG_CALL_RECORDS)
+ {
+ struct q931_call *call;
+ int num_calls;
+
+ num_calls = 0;
+ for (call = *ctrl->callpool; call; call = call->next) {
+ ++num_calls;
+ if (call->outboundbroadcast) {
+ used = pri_snprintf(buf, used, buf_size,
+ "Master call subcall count: %d\n", q931_get_subcall_count(call));
+ }
+ }
+ used = pri_snprintf(buf, used, buf_size, "Total call records: %d\n", num_calls);
+ }
+#endif /* defined(DEBUG_CALL_RECORDS) */
+#define DEBUG_CC_RECORDS
+#if defined(DEBUG_CC_RECORDS)
+ {
+ struct pri_cc_record *cc_record;
+
+ used = pri_snprintf(buf, used, buf_size, "CC records:\n");
+ for (cc_record = ctrl->cc.pool; cc_record; cc_record = cc_record->next) {
+ used = pri_snprintf(buf, used, buf_size,
+ " %ld A:%s B:%s state:%s\n", cc_record->record_id,
+ cc_record->party_a.number.valid ? cc_record->party_a.number.str : "",
+ cc_record->party_b.number.valid ? cc_record->party_b.number.str : "",
+ pri_cc_fsm_state_str(cc_record->state));
+ }
+ }
+#endif /* defined(DEBUG_CC_RECORDS) */
if (buf_size < used) {
pri_message(ctrl,
Modified: team/rmudgett/t312/pri_cc.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/t312/pri_cc.c?view=diff&rev=2217&r1=2216&r2=2217
==============================================================================
--- team/rmudgett/t312/pri_cc.c (original)
+++ team/rmudgett/t312/pri_cc.c Fri Feb 25 11:42:09 2011
@@ -2504,14 +2504,13 @@
}
/*!
- * \internal
* \brief Convert the given call completion state to a string.
*
* \param state CC state to convert to string.
*
* \return String version of call completion state.
*/
-static const char *pri_cc_fsm_state_str(enum CC_STATES state)
+const char *pri_cc_fsm_state_str(enum CC_STATES state)
{
const char *str;
@@ -2555,14 +2554,13 @@
}
/*!
- * \internal
* \brief Convert the given call completion event to a string.
*
* \param event CC event to convert to string.
*
* \return String version of call completion event.
*/
-static const char *pri_cc_fsm_event_str(enum CC_EVENTS event)
+const char *pri_cc_fsm_event_str(enum CC_EVENTS event)
{
const char *str;
Modified: team/rmudgett/t312/pri_internal.h
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/t312/pri_internal.h?view=diff&rev=2217&r1=2216&r2=2217
==============================================================================
--- team/rmudgett/t312/pri_internal.h (original)
+++ team/rmudgett/t312/pri_internal.h Fri Feb 25 11:42:09 2011
@@ -983,6 +983,7 @@
const char *q931_call_state_str(enum Q931_CALL_STATE callstate);
const char *msg2str(int msg);
+int q931_get_subcall_count(struct q931_call *master);
struct q931_call *q931_find_winning_call(struct q931_call *call);
int q931_master_pass_event(struct pri *ctrl, struct q931_call *subcall, int msg_type);
struct pri_subcommand *q931_alloc_subcommand(struct pri *ctrl);
@@ -999,6 +1000,8 @@
struct pri_cc_record *pri_cc_find_by_addressing(struct pri *ctrl, const struct q931_party_address *party_a, const struct q931_party_address *party_b, unsigned length, const unsigned char *q931_ies);
struct pri_cc_record *pri_cc_new_record(struct pri *ctrl, q931_call *call);
void pri_cc_qsig_determine_available(struct pri *ctrl, q931_call *call);
+const char *pri_cc_fsm_state_str(enum CC_STATES state);
+const char *pri_cc_fsm_event_str(enum CC_EVENTS event);
int pri_cc_event(struct pri *ctrl, q931_call *call, struct pri_cc_record *cc_record, enum CC_EVENTS event);
int q931_cc_timeout(struct pri *ctrl, struct pri_cc_record *cc_record, enum CC_EVENTS event);
void q931_cc_indirect(struct pri *ctrl, struct pri_cc_record *cc_record, void (*func)(struct pri *ctrl, q931_call *call, struct pri_cc_record *cc_record));
Modified: team/rmudgett/t312/q931.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/t312/q931.c?view=diff&rev=2217&r1=2216&r2=2217
==============================================================================
--- team/rmudgett/t312/q931.c (original)
+++ team/rmudgett/t312/q931.c Fri Feb 25 11:42:09 2011
@@ -6455,7 +6455,7 @@
master->retranstimer = pri_schedule_event(ctrl, 0, pri_fake_clearing, master);
}
-static int q931_get_subcall_count(struct q931_call *master)
+int q931_get_subcall_count(struct q931_call *master)
{
int count = 0;
int idx;
More information about the libpri-commits
mailing list