Changeset 979:b90cb4c07160 in freeDiameter for extensions/dbg_interactive/routing.i
- Timestamp:
- Mar 15, 2013, 2:45:03 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/dbg_interactive/routing.i
r740 r979 83 83 %extend rtd_candidate { 84 84 void dump() { 85 fd_log_debug("candidate %p \n", $self);86 fd_log_debug(" id : %s \n", $self->diamid);87 fd_log_debug(" rlm: %s \n", $self->realm);88 fd_log_debug(" sc : %d \n", $self->score);85 fd_log_debug("candidate %p", $self); 86 fd_log_debug(" id : %s", $self->diamid); 87 fd_log_debug(" rlm: %s", $self->realm); 88 fd_log_debug(" sc : %d", $self->score); 89 89 } 90 90 } … … 99 99 100 100 if (!pycb) { 101 fd_log_debug("Internal error: missing the callback! \n");101 fd_log_debug("Internal error: missing the callback!"); 102 102 return ENOTSUP; 103 103 } … … 113 113 /* The result is supposedly composed of: [ ret, *msg ] */ 114 114 if ((result == NULL) || (!PyList_Check(result)) || (PyList_Size(result) != 2)) { 115 fd_log_debug("Error: The Python callback did not return [ ret, msg ]. \n");115 fd_log_debug("Error: The Python callback did not return [ ret, msg ]."); 116 116 ret = EINVAL; 117 117 goto out; … … 120 120 /* Convert the return values */ 121 121 if (!SWIG_IsOK(SWIG_AsVal_int(PyList_GetItem(result, 0), &ret))) { 122 fd_log_debug("Error: Cannot convert the first return value to integer. \n");122 fd_log_debug("Error: Cannot convert the first return value to integer."); 123 123 ret = EINVAL; 124 124 goto out; 125 125 } 126 126 if (ret) { 127 TRACE_DEBUG(INFO, "The Python callback returned the error code %d (%s) \n", ret, strerror(ret));127 TRACE_DEBUG(INFO, "The Python callback returned the error code %d (%s)", ret, strerror(ret)); 128 128 goto out; 129 129 } 130 130 131 131 if (!SWIG_IsOK(SWIG_ConvertPtr(PyList_GetItem(result, 1), (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) { 132 fd_log_debug("Error: Cannot convert the second return value to message. \n");132 fd_log_debug("Error: Cannot convert the second return value to message."); 133 133 ret = EINVAL; 134 134 goto out; … … 183 183 184 184 if (!pycb) { 185 fd_log_debug("Internal error: missing the callback! \n");185 fd_log_debug("Internal error: missing the callback!"); 186 186 return ENOTSUP; 187 187 } … … 198 198 /* The result is supposedly composed of: [ ret, *msg ] */ 199 199 if (result == NULL){ 200 fd_log_debug("Error: The Python callback raised an exception. \n");200 fd_log_debug("Error: The Python callback raised an exception."); 201 201 ret = EINVAL; 202 202 goto out; … … 205 205 /* Convert the return values */ 206 206 if (!SWIG_IsOK(SWIG_AsVal_int(result, &ret))) { 207 fd_log_debug("Error: Cannot convert the return value to integer. \n");207 fd_log_debug("Error: Cannot convert the return value to integer."); 208 208 ret = EINVAL; 209 209 goto out;
Note: See TracChangeset
for help on using the changeset viewer.