Navigation


Changeset 979:b90cb4c07160 in freeDiameter for extensions/dbg_interactive


Ignore:
Timestamp:
Mar 15, 2013, 2:45:03 AM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Remove more newlines.

Location:
extensions/dbg_interactive
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • extensions/dbg_interactive/dbg_interactive.i

    r788 r979  
    7070static const char * wrapper_error_txt; /* if NULL, use strerror(errno) */
    7171#define DI_ERROR(code, pycode, str) {   \
    72         fd_log_debug("[dbg_interactive] ERROR: %s: %s\n", __PRETTY_FUNCTION__, str ? str : strerror(code)); \
     72        fd_log_debug("[dbg_interactive] ERROR: %s: %s", __PRETTY_FUNCTION__, str ? str : strerror(code)); \
    7373        wrapper_errno = code;           \
    7474        wrapper_errno_py = pycode;      \
  • extensions/dbg_interactive/dictionary.i

    r972 r979  
    240240                for (i=0; i < n; i++)
    241241                        fd_log_debug("%02.2X", $self->data[i]);
    242                 fd_log_debug("] '%.*s%s'\n", n, $self->data, n == LEN_MAX ? "..." : "");
     242                fd_log_debug("] '%.*s%s'", n, $self->data, n == LEN_MAX ? "..." : "");
    243243        }
    244244        %cstring_output_allocate_size(char ** outbuffer, size_t * outlen, free(*$1));
  • extensions/dbg_interactive/dispatch.i

    r741 r979  
    4747       
    4848        if (!pycb) {
    49                 fd_log_debug("Internal error: missing the callback!\n");
     49                fd_log_debug("Internal error: missing the callback!");
    5050                return ENOTSUP;
    5151        }
     
    6363        /* The result is supposedly composed of: [ ret, *msg, *action ] */
    6464        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 ].");
    6666                ret = EINVAL;
    6767                goto out;
     
    7070        /* Convert the return values */
    7171        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.");
    7373                ret = EINVAL;
    7474                goto out;
    7575        }
    7676        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));
    7878                goto out;
    7979        }
    8080       
    8181        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.");
    8383                ret = EINVAL;
    8484                goto out;
     
    8686       
    8787        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.");
    8989                ret = EINVAL;
    9090                goto out;
    9191        }
    9292       
    93         TRACE_DEBUG(FULL, "Python callback return: *action = %d\n", *action);
     93        TRACE_DEBUG(FULL, "Python callback return: *action = %d", *action);
    9494out:   
    9595        Py_XDECREF(result);
  • extensions/dbg_interactive/lists.i

    r741 r979  
    5757        /* For debug, show the values of the list */
    5858        void dump() {
    59                 fd_log_debug("list: %p\n", $self);
    60                 fd_log_debug("  - next: %p\n", $self->next);
    61                 fd_log_debug("  - prev: %p\n", $self->prev);
    62                 fd_log_debug("  - head: %p\n", $self->head);
    63                 fd_log_debug("  - o   : %p\n", $self->o);
     59                fd_log_debug("list: %p", $self);
     60                fd_log_debug("  - next: %p", $self->next);
     61                fd_log_debug("  - prev: %p", $self->prev);
     62                fd_log_debug("  - head: %p", $self->head);
     63                fd_log_debug("  - o   : %p", $self->o);
    6464        }
    6565        /* Insert before/after wrapper */
  • extensions/dbg_interactive/messages.i

    r740 r979  
    5151       
    5252        if (!l) {
    53                 fd_log_debug("Internal error! Python callback disappeared...\n");
     53                fd_log_debug("Internal error! Python callback disappeared...");
    5454                return;
    5555        }
     
    7272                /* The callback is supposed to return a message or NULL */
    7373                if (!SWIG_IsOK(SWIG_ConvertPtr(result, (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) {
    74                         fd_log_debug("Error: Cannot convert the return value to message.\n");
     74                        fd_log_debug("Error: Cannot convert the return value to message.");
    7575                        *msg = NULL;
    7676                }
  • extensions/dbg_interactive/peers.i

    r740 r979  
    4545       
    4646        if (!data) {
    47                 TRACE_DEBUG(INFO, "Internal error: missing callback\n");
     47                TRACE_DEBUG(INFO, "Internal error: missing callback");
    4848                return;
    4949        }
     
    119119       
    120120        if (!validate_cb2_py) {
    121                 fd_log_debug("Internal error: missing the callback2!\n");
     121                fd_log_debug("Internal error: missing the callback2!");
    122122                return ENOTSUP;
    123123        }
     
    132132        /* The result is an integer */
    133133        if ((result == NULL) || !SWIG_IsOK(SWIG_AsVal_int(result, &ret))) {
    134                 fd_log_debug("Error: The Python callback did not return an integer.\n");
     134                fd_log_debug("Error: The Python callback did not return an integer.");
    135135                ret = EINVAL;
    136136                goto out;
     
    150150       
    151151        if (!validate_cb_py) {
    152                 fd_log_debug("Internal error: missing the callback!\n");
     152                fd_log_debug("Internal error: missing the callback!");
    153153                return ENOTSUP;
    154154        }
     
    163163        /* The result is supposedly -1, 1, or a cb2 */
    164164        if (result == NULL) {
    165                 fd_log_debug("Error: The Python callback did not return a value.\n");
     165                fd_log_debug("Error: The Python callback did not return a value.");
    166166                ret = EINVAL;
    167167                goto out;
     
    171171                if (cb2) {
    172172                        if (validate_cb2_py && (validate_cb2_py != result)) {
    173                                 fd_log_debug("Only 1 register callback2 is supported currently\n");
     173                                fd_log_debug("Only 1 register callback2 is supported currently");
    174174                                ret = ENOTSUP;
    175175                                goto out;
     
    185185        } else { /* In this case, the return value must be -1, 0, or 1 */
    186186                if (!SWIG_IsOK(SWIG_AsVal_int(result, auth))) {
    187                         fd_log_debug("Error: Cannot convert the return value to integer.\n");
     187                        fd_log_debug("Error: Cannot convert the return value to integer.");
    188188                        ret = EINVAL;
    189189                        goto out;
  • extensions/dbg_interactive/routing.i

    r740 r979  
    8383%extend rtd_candidate {
    8484        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);
    8989        }
    9090}
     
    9999       
    100100        if (!pycb) {
    101                 fd_log_debug("Internal error: missing the callback!\n");
     101                fd_log_debug("Internal error: missing the callback!");
    102102                return ENOTSUP;
    103103        }
     
    113113        /* The result is supposedly composed of: [ ret, *msg ] */
    114114        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 ].");
    116116                ret = EINVAL;
    117117                goto out;
     
    120120        /* Convert the return values */
    121121        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.");
    123123                ret = EINVAL;
    124124                goto out;
    125125        }
    126126        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));
    128128                goto out;
    129129        }
    130130       
    131131        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.");
    133133                ret = EINVAL;
    134134                goto out;
     
    183183       
    184184        if (!pycb) {
    185                 fd_log_debug("Internal error: missing the callback!\n");
     185                fd_log_debug("Internal error: missing the callback!");
    186186                return ENOTSUP;
    187187        }
     
    198198        /* The result is supposedly composed of: [ ret, *msg ] */
    199199        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.");
    201201                ret = EINVAL;
    202202                goto out;
     
    205205        /* Convert the return values */
    206206        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.");
    208208                ret = EINVAL;
    209209                goto out;
  • extensions/dbg_interactive/sessions.i

    r740 r979  
    4343        PyObject *result;
    4444        if (!cb) {
    45                 fd_log_debug("Internal error: missing callback object!\n");
     45                fd_log_debug("Internal error: missing callback object!");
    4646                return;
    4747        }
     
    128128                #if 0
    129129                if (n) {
    130                         fd_log_debug("A new session has been created\n");
     130                        fd_log_debug("A new session has been created");
    131131                } else {
    132                         fd_log_debug("A session with same id already existed\n");
     132                        fd_log_debug("A session with same id already existed");
    133133                }
    134134                #endif /* 0 */
Note: See TracChangeset for help on using the changeset viewer.