mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-01-24 01:42:13 +08:00
94 lines
4.6 KiB
Diff
94 lines
4.6 KiB
Diff
From:
|
|
|
|
This commit fixes some implicit declarations in the nICEr thirt-party
|
|
component.The fixes apply to mozilla's modifications of nICEr rather than nICEr
|
|
upstream. Also of note, Mozilla bug 1374699 contains fixes and changes that deal
|
|
with these in addition to many other isues in a future firefox version, and
|
|
so this patch will not be upstreamed but rather dropped when it becomes obsolete
|
|
in firefox-58 or 59.
|
|
|
|
diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.c b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
|
|
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.c
|
|
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.c
|
|
@@ -49,17 +49,16 @@ static char *RCSSTRING __UNUSED__="$Id:
|
|
#include "nr_socket_multi_tcp.h"
|
|
#include "ice_reg.h"
|
|
#include "nr_crypto.h"
|
|
#include "r_time.h"
|
|
|
|
static int nr_ice_component_stun_server_default_cb(void *cb_arg,nr_stun_server_ctx *stun_ctx,nr_socket *sock, nr_stun_server_request *req, int *dont_free, int *error);
|
|
static int nr_ice_pre_answer_request_destroy(nr_ice_pre_answer_request **parp);
|
|
void nr_ice_component_consent_schedule_consent_timer(nr_ice_component *comp);
|
|
-void nr_ice_component_consent_destroy(nr_ice_component *comp);
|
|
|
|
/* This function takes ownership of the contents of req (but not req itself) */
|
|
static int nr_ice_pre_answer_request_create(nr_transport_addr *dst, nr_stun_server_request *req, nr_ice_pre_answer_request **parp)
|
|
{
|
|
int r, _status;
|
|
nr_ice_pre_answer_request *par = 0;
|
|
nr_stun_message_attribute *attr;
|
|
|
|
diff --git a/media/mtransport/third_party/nICEr/src/ice/ice_component.h b/media/mtransport/third_party/nICEr/src/ice/ice_component.h
|
|
--- a/media/mtransport/third_party/nICEr/src/ice/ice_component.h
|
|
+++ b/media/mtransport/third_party/nICEr/src/ice/ice_component.h
|
|
@@ -80,16 +80,17 @@ struct nr_ice_component_ {
|
|
|
|
STAILQ_ENTRY(nr_ice_component_)entry;
|
|
};
|
|
|
|
typedef STAILQ_HEAD(nr_ice_component_head_,nr_ice_component_) nr_ice_component_head;
|
|
|
|
int nr_ice_component_create(struct nr_ice_media_stream_ *stream, int component_id, nr_ice_component **componentp);
|
|
int nr_ice_component_destroy(nr_ice_component **componentp);
|
|
+void nr_ice_component_consent_destroy(nr_ice_component *comp);
|
|
int nr_ice_component_initialize(struct nr_ice_ctx_ *ctx,nr_ice_component *component);
|
|
int nr_ice_component_maybe_prune_candidate(nr_ice_ctx *ctx, nr_ice_component *comp, nr_ice_candidate *c1, int *was_pruned);
|
|
int nr_ice_component_pair_candidate(nr_ice_peer_ctx *pctx, nr_ice_component *pcomp, nr_ice_candidate *lcand, int pair_all_remote);
|
|
int nr_ice_component_pair_candidates(nr_ice_peer_ctx *pctx, nr_ice_component *lcomp, nr_ice_component *pcomp);
|
|
int nr_ice_component_service_pre_answer_requests(nr_ice_peer_ctx *pctx, nr_ice_component *pcomp, char *username, int *serviced);
|
|
int nr_ice_component_nominated_pair(nr_ice_component *comp, nr_ice_cand_pair *pair);
|
|
int nr_ice_component_failed_pair(nr_ice_component *comp, nr_ice_cand_pair *pair);
|
|
int nr_ice_component_check_if_failed(nr_ice_component *comp);
|
|
diff --git a/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c b/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c
|
|
--- a/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c
|
|
+++ b/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.c
|
|
@@ -39,16 +39,17 @@ static char *RCSSTRING __UNUSED__="$Id:
|
|
|
|
#include <nr_api.h>
|
|
#include "stun.h"
|
|
#include "async_timer.h"
|
|
#include "registry.h"
|
|
#include "stun_reg.h"
|
|
#include "nr_crypto.h"
|
|
#include "r_time.h"
|
|
+#include "ice_ctx.h"
|
|
|
|
static int nr_stun_client_send_request(nr_stun_client_ctx *ctx);
|
|
static void nr_stun_client_timer_expired_cb(NR_SOCKET s, int b, void *cb_arg);
|
|
static int nr_stun_client_get_password(void *arg, nr_stun_message *msg, Data **password);
|
|
|
|
#define NR_STUN_TRANSPORT_ADDR_CHECK_WILDCARD 1
|
|
#define NR_STUN_TRANSPORT_ADDR_CHECK_LOOPBACK 2
|
|
|
|
diff --git a/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c b/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c
|
|
--- a/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c
|
|
+++ b/media/mtransport/third_party/nICEr/src/stun/turn_client_ctx.c
|
|
@@ -43,16 +43,17 @@ static char *RCSSTRING __UNUSED__="$Id:
|
|
#include <string.h>
|
|
|
|
#include "nr_api.h"
|
|
#include "r_time.h"
|
|
#include "async_timer.h"
|
|
#include "nr_socket_buffered_stun.h"
|
|
#include "stun.h"
|
|
#include "turn_client_ctx.h"
|
|
+#include "ice_ctx.h"
|
|
|
|
int NR_LOG_TURN = 0;
|
|
|
|
#define TURN_MAX_PENDING_BYTES 32000
|
|
|
|
#define TURN_RTO 100 /* Hardcoded RTO estimate */
|
|
#define TURN_LIFETIME_REQUEST_SECONDS 3600 /* One hour */
|
|
#define TURN_USECS_PER_S 1000000
|