small fixes

- add a build debugging mode (to just exclude, for now, the -O2 - makes g++
  much slower)
- onNoPrack's signature updated in registrar client
- log errors when unable to send a message (besides a bunch of debugs, some of
  which should be warnings, actually)
sayer/1.4-spce2.6
bpi 16 years ago
parent 6d27feb346
commit be60e06c3a

@ -86,6 +86,9 @@ USE_MONITORING=yes
#
#LONG_DEBUG_MESSAGE=yes
# Is this a debug build or not?
debug=no
################### end of configuration section #######################
@ -157,11 +160,14 @@ CXX = g++
CC = gcc
LD = $(CC)
CXXFLAGS += -Wall -Wno-reorder -fPIC -g $(EXTRA_CXXFLAGS)
CFLAGS += -Wall -fPIC -g $(EXTRA_CFLAGS)
CXXFLAGS += -Wall -Wno-reorder -fPIC -g \
-O2 $(EXTRA_CXXFLAGS)
CFLAGS += -Wall -fPIC -g -O2 $(EXTRA_CFLAGS)
# only optimize if releasing, as it slows down the build process
ifneq ($(debug),yes)
CXXFLAGS += -O2
CFLAGS += -O2
endif
ifeq ($(DEBUG_PLAYOUT), yes)
CPPFLAGS += -DDEBUG_PLAYOUTBUF

@ -109,7 +109,8 @@ void SIPRegistration::doRegistration()
//else
// dlg.outbound_proxy = "";
dlg.sendRequest(req.method, "", "", "Expires: 1000\n");
if (dlg.sendRequest(req.method, "", "", "Expires: 1000\n") < 0)
ERROR("failed to send registration.\n");
// save TS
struct timeval now;
@ -133,7 +134,8 @@ void SIPRegistration::doUnregister()
//else
// dlg.outbound_proxy = "";
dlg.sendRequest(req.method, "", "", "Expires: 0\n");
if (dlg.sendRequest(req.method, "", "", "Expires: 0\n") < 0)
ERROR("failed to send deregistration.\n");
// save TS
struct timeval now;

@ -132,7 +132,7 @@ class SIPRegistration : public AmSipDialogEventHandler,
void onNoErrorACK(unsigned int) {}
#else
void onNoAck(unsigned int) {}
void onNoPrack(unsigned int) {}
void onNoPrack(const AmSipRequest &, const AmSipReply &) {}
#endif
/** is this registration registered? */

@ -186,7 +186,7 @@ void AmB2ABCallerSession::onB2ABEvent(B2ABEvent* ev)
case B2ABConnectOtherLegException:
case B2ABConnectOtherLegFailed: {
DBG("looks like callee leg could not be created. terminating our leg.\n");
WARN("looks like callee leg could not be created. terminating our leg.\n");
terminateLeg();
callee_status = None;
return;
@ -362,7 +362,8 @@ void AmB2ABCalleeSession::onSipReply(const AmSipReply& rep, int old_dlg_status)
if ((status_before == AmSipDialog::Pending)&&
(status == AmSipDialog::Disconnected)) {
DBG("callee session creation failed. notifying callersession.\n");
DBG("callee session creation failed. notifying caller session.\n");
DBG("this happened with reply: %d.\n", rep.code);
relayEvent(new B2ABConnectOtherLegFailedEvent(rep.code, rep.reason));
} else if ((status == AmSipDialog::Pending) && (rep.code == 180)) {

@ -164,15 +164,18 @@ bool UACAuth::onSipReply(const AmSipReply& reply)
if (dlg->sendRequest(ri->second.method,
ri->second.content_type,
ri->second.body,
hdrs) == 0)
hdrs) == 0) {
processed = true;
DBG("authenticated request successfully sent.\n");
} else {
ERROR("failed to send authenticated request.\n");
}
}
}
}
}
if (reply.code >= 200)
} else if (reply.code >= 200) {
sent_requests.erase(reply.cseq); // now we dont need it any more
}
return processed;
}

Loading…
Cancel
Save