Browse Source

obsolete call{ed,ing}_agent element

git.mgm/mediaproxy-ng/2.2
Richard Fuchs 13 years ago
parent
commit
9589a73b42
4 changed files with 2 additions and 13 deletions
  1. +1
    -9
      daemon/call.c
  2. +0
    -2
      daemon/call.h
  3. +0
    -2
      daemon/main.c
  4. +1
    -0
      daemon/sdp.c

+ 1
- 9
daemon/call.c View File

@ -1669,7 +1669,6 @@ str *call_update_udp(char **out, struct callmaster *m) {
c = call_get_or_create(&callid, &viabranch, m); c = call_get_or_create(&callid, &viabranch, m);
log_info = &viabranch; log_info = &viabranch;
c->calling_agent = "UNKNOWN(udp)";
if (addr_parse_udp(&st, out)) if (addr_parse_udp(&st, out))
goto fail; goto fail;
@ -1727,7 +1726,6 @@ str *call_lookup_udp(char **out, struct callmaster *m) {
(void *) 0x1); (void *) 0x1);
log_info = &branch; log_info = &branch;
c->called_agent = "UNKNOWN(udp)";
if (addr_parse_udp(&st, out)) if (addr_parse_udp(&st, out))
goto fail; goto fail;
@ -1766,8 +1764,6 @@ str *call_request(char **out, struct callmaster *m) {
str_init(&callid, out[RE_TCP_RL_CALLID]); str_init(&callid, out[RE_TCP_RL_CALLID]);
c = call_get_or_create(&callid, NULL, m); c = call_get_or_create(&callid, NULL, m);
c->calling_agent = (out[RE_TCP_RL_AGENT] && *out[RE_TCP_RL_AGENT])
? call_strdup(c, out[RE_TCP_RL_AGENT]) : "UNKNOWN";
info_parse(out[RE_TCP_RL_INFO], c); info_parse(out[RE_TCP_RL_INFO], c);
streams_parse(out[RE_TCP_RL_STREAMS], m, &s); streams_parse(out[RE_TCP_RL_STREAMS], m, &s);
num = call_streams(c, &s, g_hash_table_lookup(c->infohash, "fromtag"), 0); num = call_streams(c, &s, g_hash_table_lookup(c->infohash, "fromtag"), 0);
@ -1801,8 +1797,6 @@ str *call_lookup(char **out, struct callmaster *m) {
mutex_lock(&c->lock); mutex_lock(&c->lock);
rwlock_unlock_r(&m->hashlock); rwlock_unlock_r(&m->hashlock);
c->called_agent = (out[RE_TCP_RL_AGENT] && *out[RE_TCP_RL_AGENT])
? call_strdup(c, out[RE_TCP_RL_AGENT]) : "UNKNOWN";
info_parse(out[RE_TCP_RL_INFO], c); info_parse(out[RE_TCP_RL_INFO], c);
streams_parse(out[RE_TCP_RL_STREAMS], m, &s); streams_parse(out[RE_TCP_RL_STREAMS], m, &s);
num = call_streams(c, &s, g_hash_table_lookup(c->infohash, "totag"), 1); num = call_streams(c, &s, g_hash_table_lookup(c->infohash, "totag"), 1);
@ -2023,9 +2017,8 @@ static void call_status_iterator(struct call *c, struct control_stream *s) {
from = g_hash_table_lookup(c->infohash, "from"); from = g_hash_table_lookup(c->infohash, "from");
to = g_hash_table_lookup(c->infohash, "to"); to = g_hash_table_lookup(c->infohash, "to");
control_stream_printf(s, "session %.*s %.*s %.*s %s %s %i\n",
control_stream_printf(s, "session %.*s %.*s %.*s - - %i\n",
STR_FMT(&c->callid), STR_FMT(from), STR_FMT(to), STR_FMT(&c->callid), STR_FMT(from), STR_FMT(to),
c->calling_agent, c->called_agent,
(int) (poller_now - c->created)); (int) (poller_now - c->created));
for (l = c->callstreams->head; l; l = l->next) { for (l = c->callstreams->head; l; l = l->next) {
@ -2160,7 +2153,6 @@ const char *call_offer(bencode_item_t *input, struct callmaster *m, bencode_item
call = call_get_or_create(&callid, &viabranch, m); call = call_get_or_create(&callid, &viabranch, m);
log_info = &viabranch; log_info = &viabranch;
call->calling_agent = "UNKNOWN(ng)"; /* XXX get rid of, or make use of */
num = call_streams(call, &streams, &fromtag, 0); num = call_streams(call, &streams, &fromtag, 0);
sdp_new = sdp_replace(&sdp, &parsed, call, abs(num), (num >= 0) ? 0 : 1); sdp_new = sdp_replace(&sdp, &parsed, call, abs(num), (num >= 0) ? 0 : 1);


+ 0
- 2
daemon/call.h View File

@ -96,8 +96,6 @@ struct call {
mutex_t lock; mutex_t lock;
GQueue *callstreams; GQueue *callstreams;
GHashTable *branches; GHashTable *branches;
char *calling_agent;
char *called_agent;
str callid; str callid;
char redis_uuid[37]; char redis_uuid[37];


+ 0
- 2
daemon/main.c View File

@ -348,8 +348,6 @@ void redis_mod_verify(void *dlh) {
check_struct_offset(call, callstreams); check_struct_offset(call, callstreams);
check_struct_offset(call, branches); check_struct_offset(call, branches);
check_struct_offset(call, callid); check_struct_offset(call, callid);
check_struct_offset(call, calling_agent);
check_struct_offset(call, called_agent);
check_struct_offset(callstream, peers); check_struct_offset(callstream, peers);
check_struct_offset(callstream, call); check_struct_offset(callstream, call);


+ 1
- 0
daemon/sdp.c View File

@ -451,6 +451,7 @@ static void chopper_destroy(struct string_chopper *chop) {
/* XXX use stream numbers as index */ /* XXX use stream numbers as index */
/* XXX use port numbers as index */ /* XXX use port numbers as index */
/* XXX get rid of num/off parameters? */ /* XXX get rid of num/off parameters? */
/* XXX use iovec based rewriting */
str *sdp_replace(str *body, GQueue *sessions, struct call *call, int num, int off) { str *sdp_replace(str *body, GQueue *sessions, struct call *call, int num, int off) {
struct sdp_session *session; struct sdp_session *session;
struct sdp_media *media; struct sdp_media *media;


Loading…
Cancel
Save