mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-23 11:36:09 +00:00
scope masking
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7959 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
8ff037d384
commit
ec1cf1dc45
@ -672,12 +672,12 @@ SWITCH_STANDARD_API(fifo_api_function)
|
|||||||
} else if (!strcasecmp(argv[0], "count")) {
|
} else if (!strcasecmp(argv[0], "count")) {
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
|
||||||
int x = 0;
|
int i = 0;
|
||||||
switch_hash_this(hi, &var, NULL, &val);
|
switch_hash_this(hi, &var, NULL, &val);
|
||||||
node = (fifo_node_t *) val;
|
node = (fifo_node_t *) val;
|
||||||
len = 0;
|
len = 0;
|
||||||
for (x = 0 ;x < MAX_PRI; x++) {
|
for (i = 0; i < MAX_PRI; i++) {
|
||||||
len += switch_queue_size(node->fifo_list[x]);
|
len += switch_queue_size(node->fifo_list[i]);
|
||||||
}
|
}
|
||||||
switch_mutex_lock(node->mutex);
|
switch_mutex_lock(node->mutex);
|
||||||
stream->write_function(stream, "%s:%d:%d:%d\n", (char *)var, node->consumer_count, node->caller_count, len);
|
stream->write_function(stream, "%s:%d:%d:%d\n", (char *)var, node->consumer_count, node->caller_count, len);
|
||||||
@ -690,10 +690,10 @@ SWITCH_STANDARD_API(fifo_api_function)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ((node = switch_core_hash_find(globals.fifo_hash, argv[1]))) {
|
if ((node = switch_core_hash_find(globals.fifo_hash, argv[1]))) {
|
||||||
int x = 0;
|
int i = 0;
|
||||||
len = 0;
|
len = 0;
|
||||||
for (x = 0 ;x < MAX_PRI; x++) {
|
for (i = 0 ;i < MAX_PRI; i++) {
|
||||||
len += switch_queue_size(node->fifo_list[x]);
|
len += switch_queue_size(node->fifo_list[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user