more verbouse debug message.

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@921 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Stefan Sayer 18 years ago
parent 01e1d57a61
commit ba937a472f

@ -34,6 +34,7 @@
#include "log.h"
#include <unistd.h>
#include "ampi/SIPRegistrarClientAPI.h"
#define MOD_NAME "reg_agent"
@ -159,7 +160,8 @@ bool RegThread::check_registration(const RegInfo& ri) {
return false; // does not exist
int state = res.get(1).asInt();
int expires = res.get(2).asInt();
DBG("Got state %ud with expires %ud for registration.\n", state, expires);
DBG("Got state %s with expires %us for registration.\n",
getSIPRegistationStateString(state), expires);
if (state == 2) // expired ... FIXME: add values from API here
return false;
// else pending or active

@ -45,4 +45,13 @@ struct SIPRegistrationEvent : public AmEvent {
};
};
char* getSIPRegistationStateString(unsigned int s) {
switch (s) {
case 0: return "RegisterPending";
case 1: return "RegisterActive";
case 2: return "RegisterExpired";
default: return "unknown";
}
}
#endif

Loading…
Cancel
Save