Changeset 979:b90cb4c07160 in freeDiameter for extensions/dbg_interactive/dispatch.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/dispatch.i
r741 r979 47 47 48 48 if (!pycb) { 49 fd_log_debug("Internal error: missing the callback! \n");49 fd_log_debug("Internal error: missing the callback!"); 50 50 return ENOTSUP; 51 51 } … … 63 63 /* The result is supposedly composed of: [ ret, *msg, *action ] */ 64 64 if ((result == NULL) || (!PyList_Check(result)) || (PyList_Size(result) != 3)) { 65 fd_log_debug("Error: The Python callback did not return [ ret, msg, action ]. \n");65 fd_log_debug("Error: The Python callback did not return [ ret, msg, action ]."); 66 66 ret = EINVAL; 67 67 goto out; … … 70 70 /* Convert the return values */ 71 71 if (!SWIG_IsOK(SWIG_AsVal_int(PyList_GetItem(result, 0), &ret))) { 72 fd_log_debug("Error: Cannot convert the first return value to integer. \n");72 fd_log_debug("Error: Cannot convert the first return value to integer."); 73 73 ret = EINVAL; 74 74 goto out; 75 75 } 76 76 if (ret) { 77 TRACE_DEBUG(INFO, "The Python callback returned the error code %d (%s) \n", ret, strerror(ret));77 TRACE_DEBUG(INFO, "The Python callback returned the error code %d (%s)", ret, strerror(ret)); 78 78 goto out; 79 79 } 80 80 81 81 if (!SWIG_IsOK(SWIG_ConvertPtr(PyList_GetItem(result, 1), (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) { 82 fd_log_debug("Error: Cannot convert the second return value to message. \n");82 fd_log_debug("Error: Cannot convert the second return value to message."); 83 83 ret = EINVAL; 84 84 goto out; … … 86 86 87 87 if (!SWIG_IsOK(SWIG_AsVal_int(PyList_GetItem(result, 2), (int *)action))) { 88 fd_log_debug("Error: Cannot convert the third return value to integer. \n");88 fd_log_debug("Error: Cannot convert the third return value to integer."); 89 89 ret = EINVAL; 90 90 goto out; 91 91 } 92 92 93 TRACE_DEBUG(FULL, "Python callback return: *action = %d \n", *action);93 TRACE_DEBUG(FULL, "Python callback return: *action = %d", *action); 94 94 out: 95 95 Py_XDECREF(result);
Note: See TracChangeset
for help on using the changeset viewer.