Author: sayer
Date: 2008-04-30 16:44:48 +0200 (Wed, 30 Apr 2008)
New Revision: 921
Modified:
trunk/apps/reg_agent/RegistrationAgent.cpp
trunk/core/ampi/SIPRegistrarClientAPI.h
Log:
more verbouse debug message.
Modified: trunk/apps/reg_agent/RegistrationAgent.cpp
===================================================================
--- trunk/apps/reg_agent/RegistrationAgent.cpp 2008-04-30 14:34:57 UTC (rev
920)
+++ trunk/apps/reg_agent/RegistrationAgent.cpp 2008-04-30 14:44:48 UTC (rev
921)
@@ -34,6 +34,7 @@
#include "log.h"
#include <unistd.h>
+#include "ampi/SIPRegistrarClientAPI.h"
#define MOD_NAME "reg_agent"
@@ -159,7 +160,8 @@
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
Modified: trunk/core/ampi/SIPRegistrarClientAPI.h
===================================================================
--- trunk/core/ampi/SIPRegistrarClientAPI.h 2008-04-30 14:34:57 UTC (rev
920)
+++ trunk/core/ampi/SIPRegistrarClientAPI.h 2008-04-30 14:44:48 UTC (rev
921)
@@ -45,4 +45,13 @@
};
};
+char* getSIPRegistationStateString(unsigned int s) {
+ switch (s) {
+ case 0: return "RegisterPending";
+ case 1: return "RegisterActive";
+ case 2: return "RegisterExpired";
+ default: return "unknown";
+ }
+}
+
#endif
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev