more ICE fixes

This commit is contained in:
Richard Aas 2011-01-26 13:32:32 +00:00
parent f35510eb22
commit 3777efae20
5 changed files with 17 additions and 12 deletions

View file

@ -59,6 +59,7 @@ int icem_gather_relay(struct icem *icem, const struct sa *stun_srv,
const char *username, const char *password);
bool icem_verify_support(struct icem *icem, uint8_t compid,
const struct sa *raddr);
int icem_conncheck_start(struct icem *icem);
int icem_add_chan(struct icem *icem, uint8_t compid, const struct sa *raddr);
bool icem_mismatch(const struct icem *icem);
void icem_update(struct icem *icem);

View file

@ -386,8 +386,9 @@ int icem_conncheck_start(struct icem *icem)
icem->state = CHECKLIST_RUNNING;
DEBUG_NOTICE("starting connectivity checks with %u candidate pairs\n",
list_count(&icem->checkl));
DEBUG_NOTICE("%s: starting connectivity checks"
" with %u candidate pairs\n",
icem->name, list_count(&icem->checkl));
#if 0
(void)re_printf("%H\n", icem_debug, icem);
#endif

View file

@ -17,7 +17,7 @@
#include "ice.h"
#define DEBUG_MODULE "ice_gather"
#define DEBUG_MODULE "icegath"
#define DEBUG_LEVEL 5
#include <re_dbg.h>
@ -64,8 +64,8 @@ static void stun_resp_handler(int err, uint16_t scode, const char *reason,
--icem->nstun;
if (err || scode > 0) {
DEBUG_WARNING("{%u} STUN Request failed: %s\n",
comp->id, strerror(err));
DEBUG_WARNING("{%s.%u} STUN Request failed: %s\n",
icem->name, comp->id, strerror(err));
goto out;
}
@ -123,14 +123,14 @@ static void turnc_handler(int err, uint16_t scode, const char *reason,
--icem->nstun;
if (err) {
DEBUG_WARNING("{%d} TURN Client error: %s\n",
comp->id, strerror(err));
DEBUG_WARNING("{%s.%d} TURN Client error: %s\n",
icem->name, comp->id, strerror(err));
goto out;
}
if (scode) {
DEBUG_WARNING("{%d} TURN Client error: %u %s\n",
comp->id, scode, reason);
DEBUG_WARNING("{%s.%d} TURN Client error: %u %s\n",
icem->name, comp->id, scode, reason);
err = send_binding_request(icem, comp);
if (err)
goto out;

View file

@ -215,7 +215,6 @@ void icecomp_printf(struct icem_comp *comp, const char *fmt, ...);
/* conncheck */
int icem_conncheck_start(struct icem *icem);
void icem_conncheck_schedule_check(struct icem *icem);
void icem_conncheck_continue(struct icem *icem);
void icem_conncheck_stop(struct icem *icem);

View file

@ -142,7 +142,9 @@ static void handle_stun(struct ice *ice, struct icem *icem,
int err;
if (icem->state != CHECKLIST_RUNNING) {
DEBUG_WARNING("Checklist is not running \n");
DEBUG_WARNING("%s.%u: Checklist is not running (%s)\n",
icem->name, comp->id,
ice_checkl_state2name(icem->state));
}
/* 7.2.1.3. Learning Peer Reflexive Candidates */
@ -168,7 +170,9 @@ static void handle_stun(struct ice *ice, struct icem *icem,
}
if (!lcand) {
DEBUG_WARNING("%s: local candidate not found\n", icem->name);
DEBUG_WARNING("%s.%u: local candidate not found (checkl=%u)\n",
icem->name, comp->id,
list_count(&icem->checkl));
}
/* 7.2.1.4. Triggered Checks */