Changeset 979:b90cb4c07160 in freeDiameter
- Timestamp:
- Mar 15, 2013, 2:45:03 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/dbg_interactive.py.sample
r782 r979 53 53 # Note: the python version does not support printf-like argument list. The formating should be done in python. 54 54 # See SWIG documentation about varargs functions for more information. 55 fd_log_debug_fstr(None, "3 + 4 = %d \n" % (7))55 fd_log_debug_fstr(None, "3 + 4 = %d" % (7)) 56 56 57 57 -
extensions/app_acct/acct_conf.y
r974 r979 84 84 if ( ! acct_config->conninfo) { 85 85 fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'." 86 " You can specify 'ConnInfo=\"\";' to use default parameters. \n", conffile);86 " You can specify 'ConnInfo=\"\";' to use default parameters.", conffile); 87 87 return EINVAL; 88 88 } -
extensions/app_acct/acct_records.c
r974 r979 127 127 if (records->nball == records->nbunmap) { 128 128 fd_log_debug("The received ACR does not contain any AVP from the configuration file." 129 " This is an invalid situation. Please fix your configuration file.\n"130 " One way to ensure this does not happen is to include Session-Id in the database.\n");129 " This is an invalid situation. Please fix your configuration file." 130 " One way to ensure this does not happen is to include Session-Id in the database."); 131 131 acct_rec_empty(records); 132 132 return EINVAL; -
extensions/app_radgw/radius.c
r974 r979 328 328 for (i = 0; i < msg->radius.attr_used; i++) { 329 329 struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]); 330 fd_log_debug(" - Type: 0x%02hhx (%s) \nLen: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length);330 fd_log_debug(" - Type: 0x%02hhx (%s) Len: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length); 331 331 radius_msg_dump_attr_val(attr); 332 332 } … … 335 335 for (i = msg->ps_first; i < msg->ps_first + msg->ps_nb; i++) { 336 336 struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]); 337 fd_log_debug(" - Type: 0x%02hhx (%s) \nLen: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length);337 fd_log_debug(" - Type: 0x%02hhx (%s) Len: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length); 338 338 radius_msg_dump_attr_val(attr); 339 339 } … … 355 355 auth, MD5_MAC_LEN); 356 356 if (attr == NULL) { 357 printf("WARNING: Could not add " 358 "Message-Authenticator\n"); 357 printf("WARNING: Could not add Message-Authenticator\n"); 359 358 return -1; 360 359 } … … 693 692 if (tmp->type == RADIUS_ATTR_MESSAGE_AUTHENTICATOR) { 694 693 if (attr != NULL) { 695 printf("Multiple Message-Authenticator " 696 "attributes in RADIUS message\n"); 694 printf("Multiple Message-Authenticator attributes in RADIUS message\n"); 697 695 return 1; 698 696 } -
extensions/app_radgw/rgw_worker.c
r974 r979 164 164 if ((diam_msg == NULL) || ( fd_msg_parse_rules(diam_msg, fd_g_config->cnf_dict, NULL) ) ) { 165 165 fd_log_debug("[radgw] No or invalid Diameter message was generated after processing the RADIUS command %hhd (%s)." 166 " It may indicate a gateway configuration problem, or implementation issue in a plugin. \n",166 " It may indicate a gateway configuration problem, or implementation issue in a plugin.", 167 167 msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code)); 168 168 /* We should also dump the conflicting rule here to help debug? */ … … 280 280 281 281 if (pb) { 282 TRACE_DEBUG(INFO, "[radgw] WARNING: %d mandatory AVP in the Diameter answer have not been translated to RADIUS! \nPlease use debug.rgwx for more information.", pb);282 TRACE_DEBUG(INFO, "[radgw] WARNING: %d mandatory AVP in the Diameter answer have not been translated to RADIUS! Please use debug.rgwx for more information.", pb); 283 283 } 284 284 } -
extensions/app_radgw/rgwx_auth.c
r974 r979 1450 1450 if (ahdr->avp_value->u32 != 3) { 1451 1451 fd_log_debug("[auth.rgwx] Received Diameter answer with Auth-Request-Type set to %d (%s) from server %.*s, session %.*s." 1452 " This may cause interoperability problems with RADIUS. \n",1452 " This may cause interoperability problems with RADIUS.", 1453 1453 ahdr->avp_value->u32, 1454 1454 (ahdr->avp_value->u32 == 1) ? "AUTHENTICATE_ONLY" : -
extensions/app_radgw/rgwx_echodrop.c
r974 r979 220 220 { 221 221 fd_log_debug( "[echodrop.rgwx] The extension is configured to echo some attributes from this message, but no session object has been created for it (yet)." 222 " Please check your configuration file and include a session-generating extension BEFORE calling echodrop.rgwx to echo attributes.\n"223 " Please use debug.rgwx to retrieve more information.\n" );222 " Please check your configuration file and include a session-generating extension BEFORE calling echodrop.rgwx to echo attributes." 223 " Please use debug.rgwx to retrieve more information." ); 224 224 return EINVAL; 225 225 } ); -
extensions/dbg_interactive/dbg_interactive.i
r788 r979 70 70 static const char * wrapper_error_txt; /* if NULL, use strerror(errno) */ 71 71 #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)); \ 73 73 wrapper_errno = code; \ 74 74 wrapper_errno_py = pycode; \ -
extensions/dbg_interactive/dictionary.i
r972 r979 240 240 for (i=0; i < n; i++) 241 241 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 ? "..." : ""); 243 243 } 244 244 %cstring_output_allocate_size(char ** outbuffer, size_t * outlen, free(*$1)); -
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); -
extensions/dbg_interactive/lists.i
r741 r979 57 57 /* For debug, show the values of the list */ 58 58 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); 64 64 } 65 65 /* Insert before/after wrapper */ -
extensions/dbg_interactive/messages.i
r740 r979 51 51 52 52 if (!l) { 53 fd_log_debug("Internal error! Python callback disappeared... \n");53 fd_log_debug("Internal error! Python callback disappeared..."); 54 54 return; 55 55 } … … 72 72 /* The callback is supposed to return a message or NULL */ 73 73 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."); 75 75 *msg = NULL; 76 76 } -
extensions/dbg_interactive/peers.i
r740 r979 45 45 46 46 if (!data) { 47 TRACE_DEBUG(INFO, "Internal error: missing callback \n");47 TRACE_DEBUG(INFO, "Internal error: missing callback"); 48 48 return; 49 49 } … … 119 119 120 120 if (!validate_cb2_py) { 121 fd_log_debug("Internal error: missing the callback2! \n");121 fd_log_debug("Internal error: missing the callback2!"); 122 122 return ENOTSUP; 123 123 } … … 132 132 /* The result is an integer */ 133 133 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."); 135 135 ret = EINVAL; 136 136 goto out; … … 150 150 151 151 if (!validate_cb_py) { 152 fd_log_debug("Internal error: missing the callback! \n");152 fd_log_debug("Internal error: missing the callback!"); 153 153 return ENOTSUP; 154 154 } … … 163 163 /* The result is supposedly -1, 1, or a cb2 */ 164 164 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."); 166 166 ret = EINVAL; 167 167 goto out; … … 171 171 if (cb2) { 172 172 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"); 174 174 ret = ENOTSUP; 175 175 goto out; … … 185 185 } else { /* In this case, the return value must be -1, 0, or 1 */ 186 186 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."); 188 188 ret = EINVAL; 189 189 goto out; -
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; -
extensions/dbg_interactive/sessions.i
r740 r979 43 43 PyObject *result; 44 44 if (!cb) { 45 fd_log_debug("Internal error: missing callback object! \n");45 fd_log_debug("Internal error: missing callback object!"); 46 46 return; 47 47 } … … 128 128 #if 0 129 129 if (n) { 130 fd_log_debug("A new session has been created \n");130 fd_log_debug("A new session has been created"); 131 131 } else { 132 fd_log_debug("A session with same id already existed \n");132 fd_log_debug("A session with same id already existed"); 133 133 } 134 134 #endif /* 0 */ -
extensions/test_netemul/test_netemul.y
r974 r979 81 81 return EINVAL; 82 82 } else { 83 TRACE_DEBUG(FULL, "[test_netemul] \n latency: %lu ms (var:%u%%)\nduplicates: %G probability.", tne_conf.lat_avg, tne_conf.lat_dev, tne_conf.dupl_proba);83 TRACE_DEBUG(FULL, "[test_netemul] latency: %lu ms (var:%u%%) duplicates: %G probability.", tne_conf.lat_avg, tne_conf.lat_dev, tne_conf.dupl_proba); 84 84 } 85 85 -
libfdcore/fdd.l
r974 r979 53 53 yylloc->last_column = yylloc->first_column + yyleng - 1; \ 54 54 fd_log_debug( \ 55 "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s' \n", \55 "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'", \ 56 56 yylloc->first_line, yylloc->first_column, \ 57 57 yylloc->last_line, yylloc->last_column, \ -
libfdcore/server.c
r974 r979 387 387 CHECK_FCT(fd_cnx_get_local_eps(&fd_g_config->cnf_endpoints)); 388 388 if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) { 389 TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system. "390 "Please use \"ListenOn\" parameter in the configuration. \n"391 "This information is required to generate the CER/CEA messages. \n");389 TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system. " 390 "Please use \"ListenOn\" parameter in the configuration. " 391 "This information is required to generate the CER/CEA messages."); 392 392 return EINVAL; 393 393 } -
libfdproto/dictionary.c
r974 r979 315 315 { 316 316 if (obj) { 317 TRACE_DEBUG(FULL, "Invalid object : %p" 318 " obj->objeyec : %x / %x\n" 319 " obj->type : %d\n" 320 " obj->objeyec : %x / %x\n" 321 " obj->typeyec : %x / %x", 317 TRACE_DEBUG(FULL, "Invalid object: %p, obj->objeyec: %x/%x, obj->type: %d, obj->objeyec: %x/%x, obj->typeyec: %x/%x", 322 318 obj, 323 319 obj->objeyec, OBJECT_EYECATCHER, -
libfdproto/messages.c
r974 r979 802 802 /* Check the object */ 803 803 if (!VALIDATE_OBJ(obj)) { 804 CHECK_FCT( dump_add_str(outstr, offset, outlen, ">>> invalid object (%p)!. \n", obj) );804 CHECK_FCT( dump_add_str(outstr, offset, outlen, ">>> invalid object (%p)!.", obj) ); 805 805 return 0; 806 806 } -
libfdproto/sessions.c
r974 r979 527 527 528 528 if (!fd_os_is_valid_os0(sid,len)) { 529 TRACE_DEBUG(INFO, "Warning: a Session-Id value contains \\0 chars... (len:%zd, begin:'%.*s') \n=> Debug messages may be truncated.", len, len, sid);529 TRACE_DEBUG(INFO, "Warning: a Session-Id value contains \\0 chars... (len:%zd, begin:'%.*s') => Debug messages may be truncated.", len, len, sid); 530 530 } 531 531
Note: See TracChangeset
for help on using the changeset viewer.