Browse Source

MT#55283 obsolete bencode_dictionary_add_string_len

Change-Id: I22608b09c97bdeee364f67eaa29f291138a2b961
rfuchs/gh1842
Richard Fuchs 1 year ago
parent
commit
05a983dc14
3 changed files with 4 additions and 11 deletions
  1. +1
    -1
      daemon/call_interfaces.c
  2. +3
    -3
      daemon/dtmf.c
  3. +0
    -7
      include/bencode.h

+ 1
- 1
daemon/call_interfaces.c View File

@ -2296,7 +2296,7 @@ static const char *call_offer_answer_ng(ng_buffer *ngbuf, bencode_item_t *input,
goto out;
if (chopper->output->len)
bencode_dictionary_add_string_len(output, "sdp", chopper->output->str, chopper->output->len);
bencode_dictionary_add_str(output, "sdp", &STR_LEN(chopper->output->str, chopper->output->len));
errstr = NULL;
out:


+ 3
- 3
daemon/dtmf.c View File

@ -117,10 +117,10 @@ static void dtmf_bencode_and_notify(struct call_media *media, unsigned int event
data = bencode_dictionary_add_dictionary(notify, "data");
tags = bencode_dictionary_add_list(data, "tags");
bencode_dictionary_add_string_len(data, "callid", call->callid.s, call->callid.len);
bencode_dictionary_add_string_len(data, "source_tag", ml->tag.s, ml->tag.len);
bencode_dictionary_add_str(data, "callid", &call->callid);
bencode_dictionary_add_str(data, "source_tag", &ml->tag);
if (ml->label.s) {
bencode_dictionary_add_string_len(data, "source_label", ml->label.s, ml->label.len);
bencode_dictionary_add_str(data, "source_label", &ml->label);
}
tags_ht_iter iter;


+ 0
- 7
include/bencode.h View File

@ -115,7 +115,6 @@ bencode_item_t *bencode_dictionary_add_len(bencode_item_t *dict, const char *key
* bencode_buffer_t object. */
INLINE bencode_item_t *bencode_dictionary_add_string(bencode_item_t *dict, const char *key, const char *val);
INLINE bencode_item_t *bencode_dictionary_add_string_dup(bencode_item_t *dict, const char *key, const char *val);
INLINE bencode_item_t *bencode_dictionary_add_string_len(bencode_item_t *dict, const char *key, const char *val, size_t len);
/* Ditto, but for a "str" object */
INLINE bencode_item_t *bencode_dictionary_add_str(bencode_item_t *dict, const char *key, const str *val);
@ -405,12 +404,6 @@ INLINE bencode_item_t *bencode_dictionary_add_string(bencode_item_t *dict, const
return bencode_dictionary_add(dict, key, bencode_string(bencode_item_buffer(dict), val));
}
INLINE bencode_item_t *bencode_dictionary_add_string_len(bencode_item_t *dict, const char *key, const char *val, size_t len) {
if (!val)
return NULL;
return bencode_dictionary_add(dict, key, bencode_string_len(bencode_item_buffer(dict), val, len));
}
INLINE bencode_item_t *bencode_dictionary_add_string_dup(bencode_item_t *dict, const char *key, const char *val) {
if (!val)
return NULL;


Loading…
Cancel
Save