Changeset 974:2091bf698fb1 in freeDiameter
- Timestamp:
- Mar 15, 2013, 2:14:35 AM (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 88 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/_sample/sample.c
r740 r974 87 87 fd_dict_dump_object(example_avp_avp); 88 88 } 89 TRACE_DEBUG(INFO, "'Example-AVP' created without error \n");89 TRACE_DEBUG(INFO, "'Example-AVP' created without error"); 90 90 91 91 /* Call the c++ function */ -
extensions/acl_wl/aw_conf.l
r965 r974 96 96 <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ 97 97 <*>. { 98 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);98 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 99 99 return LEX_ERROR; 100 100 } -
extensions/acl_wl/aw_conf.y
r961 r974 74 74 if (aw_confin == NULL) { 75 75 ret = errno; 76 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));76 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 77 77 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 78 78 return ret; … … 102 102 103 103 if (ploc->first_line != ploc->last_line) 104 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);104 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 105 105 else if (ploc->first_column != ploc->last_column) 106 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);106 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 107 107 else 108 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);108 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 109 109 } 110 110 -
extensions/acl_wl/aw_tree.c
r741 r974 116 116 117 117 #if 0 118 fd_log_debug("Parsed name %s as: \n", name);118 fd_log_debug("Parsed name %s as:", name); 119 119 for (i=0; i<=l; i++) 120 fd_log_debug(" str[%d] len: %d, v:%.*s \n", i, result->label[i].len, result->label[i].len, result->label[i].str);120 fd_log_debug(" str[%d] len: %d, v:%.*s", i, result->label[i].len, result->label[i].len, result->label[i].str); 121 121 #endif /* 0 */ 122 122 return 0; … … 179 179 for (li = sub->next; li != sub; li = li->next) { 180 180 struct tree_item * ti = (struct tree_item *)li; 181 fd_log_debug("%*s%s", indent * 2, "", ti->str?:"*"); 181 char buf[1024]; 182 snprintf(buf, sizeof(buf), "%*s%s", indent * 2, "", ti->str?:"*"); 182 183 if (ti->leaf) 183 fd_log_debug(" (flag:%x)", ti->flags);184 fd_log_debug(" \n");184 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), " (flag:%x)", ti->flags); 185 fd_log_debug("%s", buf); 185 186 tree_dump(&ti->children, indent + 1); 186 187 } … … 190 191 void aw_tree_dump(void) 191 192 { 192 fd_log_debug("[acl_wl] tree dump:\n(root)\n"); 193 fd_log_debug("[acl_wl] tree dump:"); 194 fd_log_debug("(root)"); 193 195 tree_dump(&tree_root, 1); 194 fd_log_debug("[acl_wl] end of dump \n");196 fd_log_debug("[acl_wl] end of dump"); 195 197 } 196 198 … … 208 210 CHECK_FCT_DO( parse_name(name, &sn), 209 211 { 210 fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d) \n", name, AW_TREE_MAXDEPTH);212 fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d)", name, AW_TREE_MAXDEPTH); 211 213 return EINVAL; 212 214 } ); … … 229 231 ti = (struct tree_item *)(senti->next); 230 232 if (ti->str == NULL) { 231 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring. \n", name, lbl + 1);233 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring.", name, lbl + 1); 232 234 return 0; 233 235 } … … 275 277 if (sn.label[0].str[0] == '*') { 276 278 if (!FD_IS_LIST_EMPTY(senti)) { 277 fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted. \n", name);279 fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted.", name); 278 280 delete_tree(senti); 279 281 } … … 286 288 ti = (struct tree_item *)(senti->next); 287 289 if (ti->str == NULL) { 288 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring. \n", name);290 fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring.", name); 289 291 return 0; 290 292 } … … 310 312 /* We already had this label */ 311 313 if (ti->leaf) { 312 fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags. \n", name);314 fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags.", name); 313 315 ti->flags |= flags; 314 316 return 0; -
extensions/app_acct/acct_conf.l
r741 r974 81 81 if (ret != 1) { 82 82 /* No matching: an error occurred */ 83 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));83 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 84 84 return LEX_ERROR; /* trig an error in yacc parser */ 85 85 /* Maybe we could REJECT instead of failing here? */ … … 93 93 yylval->string = strdup(yytext+1); 94 94 if (!yylval->string) { 95 fd_log_debug("Unable to copy the string '%s': %s \n", yytext, strerror(errno));95 fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); 96 96 TRACE_DEBUG(INFO, "strdup failed"); 97 97 return LEX_ERROR; /* trig an error in yacc parser */ … … 137 137 /* Unrecognized sequence, if it did not match any previous pattern */ 138 138 [^[:space:]"*=>;\n]+ { 139 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);139 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 140 140 return LEX_ERROR; 141 141 } -
extensions/app_acct/acct_conf.y
r808 r974 83 83 84 84 if ( ! acct_config->conninfo) { 85 fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'. \n"85 fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'." 86 86 " You can specify 'ConnInfo=\"\";' to use default parameters.\n", conffile); 87 87 return EINVAL; 88 88 } 89 89 if ( ! acct_config->tablename) { 90 fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'. \n", conffile);90 fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'.", conffile); 91 91 return EINVAL; 92 92 } … … 97 97 struct fd_list * li; 98 98 99 fd_log_debug("[app_acct] Configuration dump: \n");100 fd_log_debug(" Database: \n");101 fd_log_debug(" ConnInfo ...... : '%s' \n", acct_config->conninfo ?: "<null>");102 fd_log_debug(" Table name .... : '%s' \n", acct_config->tablename ?: "<null>");103 fd_log_debug(" Timestamp field : '%s' \n", acct_config->tsfield ?: "<null>");104 fd_log_debug(" Server name fld : '%s' \n", acct_config->srvnfield ?: "<null>");105 fd_log_debug(" AVPs that will be saved to the database: \n");99 fd_log_debug("[app_acct] Configuration dump:"); 100 fd_log_debug(" Database:"); 101 fd_log_debug(" ConnInfo ...... : '%s'", acct_config->conninfo ?: "<null>"); 102 fd_log_debug(" Table name .... : '%s'", acct_config->tablename ?: "<null>"); 103 fd_log_debug(" Timestamp field : '%s'", acct_config->tsfield ?: "<null>"); 104 fd_log_debug(" Server name fld : '%s'", acct_config->srvnfield ?: "<null>"); 105 fd_log_debug(" AVPs that will be saved to the database:"); 106 106 for (li = acct_config->avps.next; li != &acct_config->avps; li = li->next) { 107 107 struct acct_conf_avp * a = (struct acct_conf_avp *)li; … … 112 112 fd_log_debug("field '%s' ", a->field?:a->avpname); 113 113 } 114 fd_log_debug("as ::%s \n", diam2db_types_mapping[a->avptype]);115 } 116 fd_log_debug("[app_acct] Complete. \n");114 fd_log_debug("as ::%s", diam2db_types_mapping[a->avptype]); 115 } 116 fd_log_debug("[app_acct] Complete."); 117 117 return 0; 118 118 } … … 158 158 if (acct_confin == NULL) { 159 159 ret = errno; 160 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));160 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 161 161 return ret; 162 162 } … … 180 180 181 181 if (ploc->first_line != ploc->last_line) 182 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);182 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 183 183 else if (ploc->first_column != ploc->last_column) 184 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);184 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 185 185 else 186 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);186 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 187 187 } 188 188 -
extensions/app_acct/acct_db.c
r871 r974 79 79 80 80 CHECK_PARAMS_DO( PQisthreadsafe() == 1, { 81 fd_log_debug("You PostGreSQL installation is not thread-safe! \n");81 fd_log_debug("You PostGreSQL installation is not thread-safe!"); 82 82 return EINVAL; 83 83 } ); … … 88 88 /* Check to see that the backend connection was successfully made */ 89 89 if (PQstatus(conn) != CONNECTION_OK) { 90 fd_log_debug("Connection to database failed: %s \n", PQerrorMessage(conn));90 fd_log_debug("Connection to database failed: %s", PQerrorMessage(conn)); 91 91 acct_db_free(); 92 92 return EINVAL; 93 93 } 94 94 if (PQprotocolVersion(conn) < 3) { 95 fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements. \n");95 fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements."); 96 96 acct_db_free(); 97 97 return EINVAL; … … 194 194 ADD_EXTEND(");"); 195 195 196 TRACE_DEBUG(FULL, "Preparing the following SQL statement: \n%s\n", sql);196 TRACE_DEBUG(FULL, "Preparing the following SQL statement: '%s'", sql); 197 197 res = PQprepare(conn, stmt, sql, emptyrecords.nball, NULL); 198 198 if (PQresultStatus(res) != PGRES_COMMAND_OK) { -
extensions/app_acct/acct_records.c
r741 r974 126 126 /* Check at least one AVP was mapped */ 127 127 if (records->nball == records->nbunmap) { 128 fd_log_debug("The received ACR does not contain any AVP from the configuration file. \n"128 fd_log_debug("The received ACR does not contain any AVP from the configuration file." 129 129 "This is an invalid situation. Please fix your configuration file.\n" 130 130 "One way to ensure this does not happen is to include Session-Id in the database.\n"); … … 137 137 struct acct_record_item * r = (struct acct_record_item *)(li->o); 138 138 if (r->param->required && (r->index <= 1)) { 139 fd_log_debug("The received ACR does not contain the required AVP '%s'. \n", r->param->avpname);139 fd_log_debug("The received ACR does not contain the required AVP '%s'.", r->param->avpname); 140 140 acct_rec_empty(records); 141 141 return EINVAL; -
extensions/app_diameap/diameap.l
- Property exe deleted
-
extensions/app_diameap/diameap.y
r565 r974 124 124 if (fl == NULL) { 125 125 int ret = errno; 126 TRACE_DEBUG(INFO, "Unable to open %s plugin file %s for reading: %s \n", $3, infile, strerror(ret));126 TRACE_DEBUG(INFO, "Unable to open %s plugin file %s for reading: %s", $3, infile, strerror(ret)); 127 127 yyerror (&yylloc, config, "Error adding EAP Plugin"); 128 128 YYERROR; -
extensions/app_diameap/diameap_eap.c
- Property exe deleted
-
extensions/app_diameap/diameap_eap.h
- Property exe deleted
-
extensions/app_diameap/diameap_eappacket.c
r425 r974 186 186 return; 187 187 188 fd_log_debug("------------- Dump EAP Packet------------- \n");188 fd_log_debug("------------- Dump EAP Packet-------------"); 189 189 int i; 190 190 fd_log_debug("\t -Code : "); … … 194 194 { 195 195 case 1: 196 fd_log_debug("Request \n");196 fd_log_debug("Request"); 197 197 break; 198 198 case 2: 199 fd_log_debug("Response \n");199 fd_log_debug("Response"); 200 200 break; 201 201 case 3: 202 fd_log_debug("Success \n");202 fd_log_debug("Success"); 203 203 break; 204 204 case 4: 205 fd_log_debug("Failure \n");205 fd_log_debug("Failure"); 206 206 break; 207 207 default: 208 fd_log_debug("Error (EAP Code value [%d] not allowed) \n",code);208 fd_log_debug("Error (EAP Code value [%d] not allowed)",code); 209 209 break; 210 210 } 211 211 u8 id; 212 212 CHECK_FCT_DO(diameap_eap_get_identifier(eappacket,&id),return); 213 fd_log_debug("\t -Identifier : %x \n", id);213 fd_log_debug("\t -Identifier : %x ", id); 214 214 u16 length; 215 215 CHECK_FCT_DO(diameap_eap_get_length(eappacket,&length),return); 216 fd_log_debug("\t -Length : %d \n", (unsigned int)length);216 fd_log_debug("\t -Length : %d ", (unsigned int)length); 217 217 if (eappacket.length > 4) 218 218 { 219 219 eap_type type; 220 220 CHECK_FCT_DO(diameap_eap_get_type(eappacket,&type),return); 221 fd_log_debug("\t -Type : %d \n", type);221 fd_log_debug("\t -Type : %d ", type); 222 222 } 223 223 if (eappacket.length > 5) 224 224 { 225 fd_log_debug("\t -Data : "); 225 char buf[1024]; 226 snprintf(buf, sizeof(buf), "\t -Data : "); 226 227 for (i = 5; i < eappacket.length && i < 30; i++) 227 228 { 228 fd_log_debug("%02x ", G8(eappacket.data + i));229 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02x ", G8(eappacket.data + i)); 229 230 } 230 231 if(i+1<eappacket.length) 231 fd_log_debug("[...] (len=%d)",(unsigned int) length);232 fd_log_debug(" \n");233 } 234 fd_log_debug("-------------End Dump EAP Packet------------- \n");232 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "[...] (len=%d)",(unsigned int) length); 233 fd_log_debug("%s", buf); 234 } 235 fd_log_debug("-------------End Dump EAP Packet-------------"); 235 236 } 236 237 -
extensions/app_diameap/diameap_init.c
r565 r974 368 368 return; 369 369 370 fd_log_debug( 371 "-------- DiamEAP extension : Configuration parameters (Dump) -------------\n"); 372 fd_log_debug("\t-Configuration file.....: %s\n", diameap_config->conffile); 373 fd_log_debug("\t-EAP Application Id.....: %u\n", 370 fd_log_debug("-------- DiamEAP extension : Configuration parameters (Dump) -------------"); 371 fd_log_debug("\t-Configuration file.....: %s", diameap_config->conffile); 372 fd_log_debug("\t-EAP Application Id.....: %u", 374 373 diameap_config->application_id); 375 fd_log_debug("\t-EAP Application Command: %u \n",374 fd_log_debug("\t-EAP Application Command: %u", 376 375 diameap_config->command_code); 377 fd_log_debug("\t-EAP Application Vendor.: %u \n", diameap_config->vendor_id);378 fd_log_debug("\t-Max invalid EAP packets: %u \n", diameap_config->max_invalid_eap_packet);379 fd_log_debug("\t-Multi-Round Timeout....: %u \n", diameap_config->multi_round_time_out);376 fd_log_debug("\t-EAP Application Vendor.: %u", diameap_config->vendor_id); 377 fd_log_debug("\t-Max invalid EAP packets: %u", diameap_config->max_invalid_eap_packet); 378 fd_log_debug("\t-Multi-Round Timeout....: %u", diameap_config->multi_round_time_out); 380 379 if (diameap_config->db.user) 381 380 { 382 fd_log_debug("\t-MySQL Database Params..: \n\t\tUser .......:%s\n",383 384 fd_log_debug("\t\tServer .....:%s \n", diameap_config->db.server);385 fd_log_debug("\t\tDatabase....:%s \n", diameap_config->db.database);386 } 387 388 fd_log_debug("\t-EAP Method Plugins.....: \n");381 fd_log_debug("\t-MySQL Database Params..:"); 382 fd_log_debug("\t\tUser .......:%s", diameap_config->db.user); 383 fd_log_debug("\t\tServer .....:%s", diameap_config->db.server); 384 fd_log_debug("\t\tDatabase....:%s", diameap_config->db.database); 385 } 386 387 fd_log_debug("\t-EAP Method Plugins.....: "); 389 388 diameap_plugin_dump(); 390 389 391 fd_log_debug( 392 "-------- DiamEAP extension : Configuration parameters (End) ---------------\n"); 390 fd_log_debug("-------- DiamEAP extension : Configuration parameters (End) ---------------"); 393 391 } 394 392 -
extensions/app_diameap/diameap_plugins.c
r610 r974 76 76 { 77 77 struct plugin * plugin = (struct plugin *) pl; 78 fd_log_debug("\t\t - %s plugin \t [Type: %i, Vendor: %i] %sloaded \n", plugin->methodname,78 fd_log_debug("\t\t - %s plugin \t [Type: %i, Vendor: %i] %sloaded", plugin->methodname, 79 79 plugin->methodtype,plugin->vendor, plugin->handler ? "" : "not "); 80 80 } -
extensions/app_diameap/plugins.h
- Property exe deleted
-
extensions/app_diameap/plugins/eap_identity/eap_identity.c
- Property exe deleted
-
extensions/app_diameap/plugins/eap_tls/eaptls.l
- Property exe deleted
-
extensions/app_diameap/plugins/eap_tls/eaptls.y
- Property exe deleted
-
extensions/app_radgw/radius.c
r972 r974 320 320 auth = &(msg->radius.hdr->authenticator[0]); 321 321 322 fd_log_debug("------ RADIUS msg dump ------- \n");323 fd_log_debug(" id : 0x%02hhx, code : %hhd (%s), length : %d \n", msg->radius.hdr->identifier, msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code), ntohs(msg->radius.hdr->length));324 fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx \n",322 fd_log_debug("------ RADIUS msg dump -------"); 323 fd_log_debug(" id : 0x%02hhx, code : %hhd (%s), length : %d", msg->radius.hdr->identifier, msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code), ntohs(msg->radius.hdr->length)); 324 fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", 325 325 auth[0], auth[1], auth[2], auth[3], auth[4], auth[5], auth[6], auth[7]); 326 fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx \n",326 fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", 327 327 auth[8], auth[9], auth[10], auth[11], auth[12], auth[13], auth[14], auth[15]); 328 328 for (i = 0; i < msg->radius.attr_used; i++) { … … 332 332 } 333 333 if (has_meta && msg->ps_nb) { 334 fd_log_debug("---- hidden attributes: \n");334 fd_log_debug("---- hidden attributes:"); 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]); … … 339 339 } 340 340 } 341 fd_log_debug("----------------------------- \n");341 fd_log_debug("-----------------------------"); 342 342 } 343 343 … … 527 527 msg_len = ntohs(hdr->length); 528 528 if (msg_len < sizeof(*hdr) || msg_len > len) { 529 TRACE_DEBUG(INFO, "Invalid RADIUS message length \n");529 TRACE_DEBUG(INFO, "Invalid RADIUS message length"); 530 530 return EINVAL; 531 531 } 532 532 533 533 if (msg_len < len) { 534 TRACE_DEBUG(INFO, "Ignored %lu extra bytes after RADIUS message \n",534 TRACE_DEBUG(INFO, "Ignored %lu extra bytes after RADIUS message", 535 535 (unsigned long) len - msg_len); 536 536 } -
extensions/app_radgw/rgw_clients.c
r965 r974 983 983 984 984 if (!FD_IS_LIST_EMPTY(&cli_ip)) 985 fd_log_debug(" RADIUS IP clients list: \n");985 fd_log_debug(" RADIUS IP clients list:"); 986 986 dump_cli_list(&cli_ip); 987 987 988 988 if (!FD_IS_LIST_EMPTY(&cli_ip6)) 989 fd_log_debug(" RADIUS IPv6 clients list: \n");989 fd_log_debug(" RADIUS IPv6 clients list:"); 990 990 dump_cli_list(&cli_ip6); 991 991 -
extensions/app_radgw/rgw_conf.l
r741 r974 89 89 yylval->string = strdup(yytext+1); 90 90 if (yylval->string == NULL) { 91 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));91 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 92 92 return LEX_ERROR; /* trig an error in yacc parser */ 93 93 } … … 111 111 if (ret != 1) { 112 112 /* No matching: an error occurred */ 113 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));113 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 114 114 return LEX_ERROR; /* trig an error in yacc parser */ 115 115 /* Maybe we could REJECT instead of failing here? */ … … 133 133 work = strdup(yytext); 134 134 if ( work == NULL ) { 135 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));135 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 136 136 return LEX_ERROR; /* trig an error in yacc parser */ 137 137 } … … 141 141 port++; 142 142 if (sscanf(port, "%hu]", &p) != 1) { 143 fd_log_debug("'%s' is not a valid port: %s \n", port, strerror(errno));143 fd_log_debug("'%s' is not a valid port: %s", port, strerror(errno)); 144 144 free(work); 145 145 return LEX_ERROR; /* trig an error in yacc parser */ … … 153 153 sin6 = malloc(sizeof(struct sockaddr_in6)); 154 154 if (sin6 == NULL) { 155 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));155 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 156 156 free(work); 157 157 return LEX_ERROR; /* trig an error in yacc parser */ … … 161 161 sin6->sin6_family = AF_INET6; 162 162 if (inet_pton(AF_INET6, work, &sin6->sin6_addr) != 1) { 163 fd_log_debug("'%s' is not a valid IPv6 address: %s \n", work, strerror(errno));163 fd_log_debug("'%s' is not a valid IPv6 address: %s", work, strerror(errno)); 164 164 free(work); 165 165 free(sin6); … … 173 173 sin = malloc(sizeof(struct sockaddr_in)); 174 174 if (sin == NULL) { 175 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));175 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 176 176 free(work); 177 177 return LEX_ERROR; /* trig an error in yacc parser */ … … 181 181 sin->sin_family = AF_INET; 182 182 if (inet_pton(AF_INET, work, &sin->sin_addr) != 1) { 183 fd_log_debug("'%s' is not a valid IP address: %s \n", work, strerror(errno));183 fd_log_debug("'%s' is not a valid IP address: %s", work, strerror(errno)); 184 184 free(work); 185 185 free(sin); … … 213 213 if (ret != 1) { 214 214 /* No matching: an error occurred */ 215 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));215 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 216 216 return LEX_ERROR; /* trig an error in yacc parser */ 217 217 /* Maybe we could REJECT instead of failing here? */ … … 227 227 sin = malloc(sizeof(struct sockaddr_in)); 228 228 if (sin == NULL) { 229 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));229 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 230 230 return LEX_ERROR; /* trig an error in yacc parser */ 231 231 } … … 234 234 sin->sin_family = AF_INET; 235 235 if (inet_pton(AF_INET, yytext, &sin->sin_addr) != 1) { 236 fd_log_debug("'%s' is not a valid IP address: %s \n", yytext, strerror(errno));236 fd_log_debug("'%s' is not a valid IP address: %s", yytext, strerror(errno)); 237 237 free(sin); 238 238 return LEX_ERROR; /* trig an error in yacc parser */ … … 247 247 sin6 = malloc(sizeof(struct sockaddr_in6)); 248 248 if (sin6 == NULL) { 249 fd_log_debug("Unable to allocate memory: %s \n", strerror(errno));249 fd_log_debug("Unable to allocate memory: %s", strerror(errno)); 250 250 return LEX_ERROR; /* trig an error in yacc parser */ 251 251 } … … 254 254 sin6->sin6_family = AF_INET6; 255 255 if (inet_pton(AF_INET6, yytext, &sin6->sin6_addr) != 1) { 256 fd_log_debug("'%s' is not a valid IPv6 address: %s \n", yytext, strerror(errno));256 fd_log_debug("'%s' is not a valid IPv6 address: %s", yytext, strerror(errno)); 257 257 free(sin6); 258 258 return LEX_ERROR; /* trig an error in yacc parser */ … … 271 271 /* Unrecognized character */ 272 272 <*>. { 273 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);273 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 274 274 return LEX_ERROR; 275 275 } -
extensions/app_radgw/rgw_conf.y
r741 r974 69 69 if (rgw_confin == NULL) { 70 70 ret = errno; 71 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));71 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 72 72 return ret; 73 73 } … … 91 91 { 92 92 if (ploc->first_line != ploc->last_line) 93 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);93 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 94 94 else if (ploc->first_column != ploc->last_column) 95 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);95 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 96 96 else 97 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);97 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 98 98 } 99 99 … … 111 111 rez = realloc(buf, buf_rsz); 112 112 if (rez == NULL) { 113 fd_log_debug("Error on memory allocation: %s \n", strerror(errno));113 fd_log_debug("Error on memory allocation: %s", strerror(errno)); 114 114 return 0; 115 115 } … … 198 198 if (fd == NULL) { 199 199 int ret = errno; 200 TRACE_DEBUG(INFO, "Unable to open file %s for reading: %s \n", fname, strerror(ret));200 TRACE_DEBUG(INFO, "Unable to open file %s for reading: %s", fname, strerror(ret)); 201 201 yyerror (&yylloc, conffile, "Error adding plugin"); 202 202 YYERROR; -
extensions/app_radgw/rgw_plugins.c
r741 r974 188 188 if (new->dlo == NULL) { 189 189 /* An error occured */ 190 fd_log_debug("Loading of plugin '%s' failed: \n %s\n", plgfile, dlerror());190 fd_log_debug("Loading of plugin '%s' failed: %s", plgfile, dlerror()); 191 191 goto error; 192 192 } … … 196 196 if (new->descriptor == NULL) { 197 197 /* An error occured */ 198 fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s': \n %s\n", plgfile, dlerror());198 fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s': %s", plgfile, dlerror()); 199 199 goto error; 200 200 } … … 206 206 CHECK_FCT_DO( (*(new->descriptor->rgwp_conf_parse))(conffile, &new->cs), 207 207 { 208 fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting... \n", conffile, plgfile);208 fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...", conffile, plgfile); 209 209 goto error; 210 210 } ); … … 266 266 267 267 if ( ! FD_IS_LIST_EMPTY( &plg_list ) ) 268 fd_log_debug("[app_radgw] --- List of registered plugins: \n");268 fd_log_debug("[app_radgw] --- List of registered plugins:"); 269 269 for (ptr = plg_list.next; ptr != &plg_list; ptr = ptr->next) { 270 270 char buf[1024]; 271 271 plg = (struct plg_descr *)ptr; 272 272 273 fd_log_debug(" %-25s ( %p ) - types: %s%s, codes: ",274 275 276 277 273 snprintf(buf, sizeof(buf), " %-25s ( %p ) - types: %s%s, codes: ", 274 plg->descriptor->rgwp_name, 275 plg->cs, 276 plg->type & RGW_PLG_TYPE_AUTH ? "Au" : " ", 277 plg->type & RGW_PLG_TYPE_ACCT ? "Ac" : " "); 278 278 279 279 if (plg->cc) { … … 281 281 282 282 for (i = 0; i < plg->cc_len; i++) { 283 fd_log_debug("%02hhx ", plg->cc[i]);283 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02hhx ", plg->cc[i]); 284 284 } 285 fd_log_debug(" \n");285 fd_log_debug("%s", buf); 286 286 } else { 287 fd_log_debug(" *\n");287 fd_log_debug("%s*", buf); 288 288 } 289 289 } … … 297 297 CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), ); 298 298 if ( !FD_IS_LIST_EMPTY( &plg_accel_auth ) || !FD_IS_LIST_EMPTY( &plg_accel_acct )) 299 fd_log_debug(" --- Accelerators: \n");299 fd_log_debug(" --- Accelerators:"); 300 300 301 301 for (ptraccel = plg_accel_auth.next; ptraccel != &plg_accel_auth; ptraccel = ptraccel->next) { 302 302 struct plg_accel * accel = (struct plg_accel *)ptraccel; 303 fd_log_debug(" auth, code %02hhu: \n", accel->ccode);303 fd_log_debug(" auth, code %02hhu:", accel->ccode); 304 304 305 305 for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) { 306 306 struct plg_accel_item * item = (struct plg_accel_item *)ptr; 307 fd_log_debug(" %-15s (%p) \n", item->plg->descriptor->rgwp_name, item->plg->cs);307 fd_log_debug(" %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs); 308 308 } 309 309 } 310 310 for (ptraccel = plg_accel_acct.next; ptraccel != &plg_accel_acct; ptraccel = ptraccel->next) { 311 311 struct plg_accel * accel = (struct plg_accel *)ptraccel; 312 fd_log_debug(" acct, code %02hhu: \n", accel->ccode);312 fd_log_debug(" acct, code %02hhu:", accel->ccode); 313 313 314 314 for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) { 315 315 struct plg_accel_item * item = (struct plg_accel_item *)ptr; 316 fd_log_debug(" %-15s (%p) \n", item->plg->descriptor->rgwp_name, item->plg->cs);316 fd_log_debug(" %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs); 317 317 } 318 318 } … … 380 380 if (ret > 0) { 381 381 /* Critical error, log and exit */ 382 TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s \n", rgw_clients_id(cli), strerror(ret));382 TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s", rgw_clients_id(cli), strerror(ret)); 383 383 return ret; 384 384 } … … 436 436 if (ret > 0) { 437 437 /* Critical error, log and exit */ 438 fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s \n", strerror(ret));438 fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s", strerror(ret)); 439 439 return ret; 440 440 } -
extensions/app_radgw/rgw_servers.c
r965 r974 52 52 return; 53 53 54 fd_log_debug(" auth server: \n");55 fd_log_debug(" disabled..... : %s \n", rgw_servers.auth_serv.disabled ? "TRUE":"false");56 fd_log_debug(" IP disabled.. : %s \n", rgw_servers.auth_serv.ip_disabled ? "TRUE":"false");57 fd_log_debug(" IPv6 disabled : %s \n", rgw_servers.auth_serv.ip6_disabled ? "TRUE":"false");58 fd_log_debug(" port......... : %hu \n", ntohs(rgw_servers.auth_serv.port));54 fd_log_debug(" auth server:"); 55 fd_log_debug(" disabled..... : %s", rgw_servers.auth_serv.disabled ? "TRUE":"false"); 56 fd_log_debug(" IP disabled.. : %s", rgw_servers.auth_serv.ip_disabled ? "TRUE":"false"); 57 fd_log_debug(" IPv6 disabled : %s", rgw_servers.auth_serv.ip6_disabled ? "TRUE":"false"); 58 fd_log_debug(" port......... : %hu", ntohs(rgw_servers.auth_serv.port)); 59 59 inet_ntop(AF_INET, &rgw_servers.auth_serv.ip_endpoint,ipstr,sizeof(ipstr)); 60 fd_log_debug(" IP bind...... : %s \n", ipstr);60 fd_log_debug(" IP bind...... : %s", ipstr); 61 61 inet_ntop(AF_INET6, &rgw_servers.auth_serv.ip6_endpoint,ipstr,sizeof(ipstr)); 62 fd_log_debug(" IPv6 bind.... : %s \n", ipstr);63 64 fd_log_debug(" acct server: \n");65 fd_log_debug(" disabled..... : %s \n", rgw_servers.acct_serv.disabled ? "TRUE":"false");66 fd_log_debug(" IP disabled.. : %s \n", rgw_servers.acct_serv.ip_disabled ? "TRUE":"false");67 fd_log_debug(" IPv6 disabled : %s \n", rgw_servers.acct_serv.ip6_disabled ? "TRUE":"false");68 fd_log_debug(" port......... : %hu \n", ntohs(rgw_servers.acct_serv.port));62 fd_log_debug(" IPv6 bind.... : %s", ipstr); 63 64 fd_log_debug(" acct server:"); 65 fd_log_debug(" disabled..... : %s", rgw_servers.acct_serv.disabled ? "TRUE":"false"); 66 fd_log_debug(" IP disabled.. : %s", rgw_servers.acct_serv.ip_disabled ? "TRUE":"false"); 67 fd_log_debug(" IPv6 disabled : %s", rgw_servers.acct_serv.ip6_disabled ? "TRUE":"false"); 68 fd_log_debug(" port......... : %hu", ntohs(rgw_servers.acct_serv.port)); 69 69 inet_ntop(AF_INET, &rgw_servers.acct_serv.ip_endpoint,ipstr,sizeof(ipstr)); 70 fd_log_debug(" IP bind...... : %s \n", ipstr);70 fd_log_debug(" IP bind...... : %s", ipstr); 71 71 inet_ntop(AF_INET6, &rgw_servers.acct_serv.ip6_endpoint,ipstr,sizeof(ipstr)); 72 fd_log_debug(" IPv6 bind.... : %s \n", ipstr);72 fd_log_debug(" IPv6 bind.... : %s", ipstr); 73 73 74 74 } -
extensions/app_radgw/rgw_worker.c
r767 r974 163 163 /* Check the created Diameter message -- it will be invalid if no callback has handled the RADIUS message */ 164 164 if ((diam_msg == NULL) || ( fd_msg_parse_rules(diam_msg, fd_g_config->cnf_dict, NULL) ) ) { 165 fd_log_debug("[radgw] No or invalid Diameter message was generated after processing the RADIUS command %hhd (%s). \n"165 fd_log_debug("[radgw] No or invalid Diameter message was generated after processing the RADIUS command %hhd (%s)." 166 166 " It may indicate a gateway configuration problem, or implementation issue in a plugin.\n", 167 167 msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code)); … … 174 174 struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[a]); 175 175 pb++; 176 fd_log_debug("[radgw] No plugin available to handle attribute %hhd (%s) in command %hhd (%s)! Translation aborted. \n",176 fd_log_debug("[radgw] No plugin available to handle attribute %hhd (%s) in command %hhd (%s)! Translation aborted.", 177 177 attr->type, rgw_msg_attrtype_str(attr->type), 178 178 msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code)); … … 193 193 rgw_clients_dispose(&cli); 194 194 195 TRACE_DEBUG(INFO, "%d problem(s) occurred while translating a RADIUS message, data discarded. \n", pb);195 TRACE_DEBUG(INFO, "%d problem(s) occurred while translating a RADIUS message, data discarded.", pb); 196 196 continue; 197 197 } … … 207 207 { 208 208 /* If an error occurs, log and destroy the data */ 209 fd_log_debug("An error occurred while sending Diameter message, please turn Debug on for detail. \n");209 fd_log_debug("An error occurred while sending Diameter message, please turn Debug on for detail."); 210 210 if (session) { 211 211 CHECK_FCT_DO( fd_sess_destroy(&session), ); -
extensions/app_radgw/rgwx_acct.c
r965 r974 1266 1266 1267 1267 default: 1268 fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response \n",1268 fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response", 1269 1269 ahdr->avp_value->u32, 1270 1270 oh->avp_value->os.len, oh->avp_value->os.data, … … 1273 1273 if (avp) { 1274 1274 CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); 1275 fd_log_debug("[acct.rgwx] Error-Message content: '%.*s' \n",1275 fd_log_debug("[acct.rgwx] Error-Message content: '%.*s'", 1276 1276 ahdr->avp_value->os.len, ahdr->avp_value->os.data); 1277 1277 } … … 1279 1279 if (avp) { 1280 1280 CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); 1281 fd_log_debug("[acct.rgwx] Error-Reporting-Host: '%.*s' \n",1281 fd_log_debug("[acct.rgwx] Error-Reporting-Host: '%.*s'", 1282 1282 ahdr->avp_value->os.len, ahdr->avp_value->os.data); 1283 1283 } 1284 1284 CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp) ); 1285 1285 if (avp) { 1286 fd_log_debug("[acct.rgwx] Failed-AVP was included in the message. \n");1286 fd_log_debug("[acct.rgwx] Failed-AVP was included in the message."); 1287 1287 /* Dump its content ? */ 1288 1288 } -
extensions/app_radgw/rgwx_auth.c
r972 r974 1237 1237 /* In any case, the following is processed: */ 1238 1238 (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT; 1239 fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject \n",1239 fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject", 1240 1240 ahdr->avp_value->u32, 1241 1241 oh->avp_value->os.len, oh->avp_value->os.data, … … 1244 1244 if (avp_x) { 1245 1245 CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) ); 1246 fd_log_debug("[auth.rgwx] Error-Message content: '%.*s' \n",1246 fd_log_debug("[auth.rgwx] Error-Message content: '%.*s'", 1247 1247 ahdr->avp_value->os.len, ahdr->avp_value->os.data); 1248 1248 } … … 1250 1250 if (avp_x) { 1251 1251 CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) ); 1252 fd_log_debug("[auth.rgwx] Error-Reporting-Host: '%.*s' \n",1252 fd_log_debug("[auth.rgwx] Error-Reporting-Host: '%.*s'", 1253 1253 ahdr->avp_value->os.len, ahdr->avp_value->os.data); 1254 1254 } 1255 1255 CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp_x) ); 1256 1256 if (avp_x) { 1257 fd_log_debug("[auth.rgwx] Failed-AVP was included in the message. \n");1257 fd_log_debug("[auth.rgwx] Failed-AVP was included in the message."); 1258 1258 /* Dump its content ? */ 1259 1259 } … … 1449 1449 /* We only check the value */ 1450 1450 if (ahdr->avp_value->u32 != 3) { 1451 fd_log_debug("[auth.rgwx] Received Diameter answer with Auth-Request-Type set to %d (%s) from server %.*s, session %.*s. \n"1451 fd_log_debug("[auth.rgwx] Received Diameter answer with Auth-Request-Type set to %d (%s) from server %.*s, session %.*s." 1452 1452 " This may cause interoperability problems with RADIUS.\n", 1453 1453 ahdr->avp_value->u32, … … 1614 1614 case DIAM_ATTR_NAS_FILTER_RULE: 1615 1615 /* This is not translatable to RADIUS */ 1616 fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring. \n",1616 fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.", 1617 1617 oh->avp_value->os.len, oh->avp_value->os.data, 1618 1618 sid->avp_value->os.len, sid->avp_value->os.data); … … 1647 1647 case DIAM_ATTR_QOS_FILTER_RULE: 1648 1648 /* This is not translatable to RADIUS */ 1649 fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring. \n",1649 fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.", 1650 1650 oh->avp_value->os.len, oh->avp_value->os.data, 1651 1651 sid->avp_value->os.len, sid->avp_value->os.data); … … 1856 1856 1857 1857 if (ahdr->avp_value->os.len != 64) { 1858 TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %d != 64. \n", ahdr->avp_value->os.len)1858 TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %d != 64.", ahdr->avp_value->os.len) 1859 1859 } 1860 1860 -
extensions/app_radgw/rgwx_debug.c
r740 r974 57 57 58 58 auth = &(msg->hdr->authenticator[0]); 59 fd_log_debug(" id : 0x%02hhx, code: %hhd (%s) \n", msg->hdr->identifier, msg->hdr->code, rgw_msg_code_str(msg->hdr->code));60 fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx \n",59 fd_log_debug(" id : 0x%02hhx, code: %hhd (%s)", msg->hdr->identifier, msg->hdr->code, rgw_msg_code_str(msg->hdr->code)); 60 fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", 61 61 auth[0], auth[1], auth[2], auth[3], 62 62 auth[4], auth[5], auth[6], auth[7]); 63 fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx \n",63 fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", 64 64 auth[8], auth[9], auth[10], auth[11], 65 65 auth[12], auth[13], auth[14], auth[15]); 66 66 for (i = 0; i < msg->attr_used; i++) { 67 67 struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->buf + msg->attr_pos[i]); 68 fd_log_debug(" - len:%3hhu, type:0x%02hhx (%s) \n", attr->length, attr->type, rgw_msg_attrtype_str(attr->type));68 fd_log_debug(" - len:%3hhu, type:0x%02hhx (%s)", attr->length, attr->type, rgw_msg_attrtype_str(attr->type)); 69 69 /* If we need to dump the value, it's better to call directly radius_msg_dump instead... */ 70 70 } … … 76 76 TRACE_ENTRY("%p %p %p %p %p %p", cs, session, rad_req, rad_ans, diam_fw, cli); 77 77 78 fd_log_debug("------------- RADIUS/Diameter Request Debug%s%s%s ------------- \n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");78 fd_log_debug("------------- RADIUS/Diameter Request Debug%s%s%s -------------", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); 79 79 80 80 if (!rad_req) { 81 fd_log_debug(" RADIUS request: NULL pointer \n");81 fd_log_debug(" RADIUS request: NULL pointer"); 82 82 } else { 83 fd_log_debug(" RADIUS request (%p) DUMP: \n", rad_req);83 fd_log_debug(" RADIUS request (%p) DUMP:", rad_req); 84 84 debug_dump_radius(rad_req); 85 85 } 86 86 87 87 if (!rad_ans || ! *rad_ans) { 88 fd_log_debug(" RADIUS answer: NULL pointer \n");88 fd_log_debug(" RADIUS answer: NULL pointer"); 89 89 } else { 90 fd_log_debug(" RADIUS answer (%p) DUMP: \n", *rad_ans);90 fd_log_debug(" RADIUS answer (%p) DUMP:", *rad_ans); 91 91 debug_dump_radius(*rad_ans); 92 92 } 93 93 94 94 if (!diam_fw || ! *diam_fw) { 95 fd_log_debug(" Diameter message: NULL pointer \n");95 fd_log_debug(" Diameter message: NULL pointer"); 96 96 } else { 97 fd_log_debug(" Diameter message (%p) DUMP: \n", *diam_fw);97 fd_log_debug(" Diameter message (%p) DUMP:", *diam_fw); 98 98 fd_msg_dump_walk(0, *diam_fw); 99 99 } 100 100 101 101 if (!session || ! *session) { 102 fd_log_debug(" Diameter session: NULL pointer \n");102 fd_log_debug(" Diameter session: NULL pointer"); 103 103 } else { 104 104 os0_t str; … … 106 106 CHECK_FCT( fd_sess_getsid(*session, &str, &str_len) ); 107 107 108 fd_log_debug(" Diameter session: %s \n", str);108 fd_log_debug(" Diameter session: %s", str); 109 109 } 110 110 111 fd_log_debug("=========== Debug%s%s%s complete ============= \n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");111 fd_log_debug("=========== Debug%s%s%s complete =============", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); 112 112 113 113 return 0; … … 119 119 TRACE_ENTRY("%p %p %p %p %p %p", cs, session, diam_ans, rad_fw, cli, stateful); 120 120 121 fd_log_debug("------------- RADIUS/Diameter Answer Debug%s%s%s ------------- \n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");121 fd_log_debug("------------- RADIUS/Diameter Answer Debug%s%s%s -------------", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); 122 122 123 123 if (!diam_ans || ! *diam_ans) { 124 fd_log_debug(" Diameter message: NULL pointer \n");124 fd_log_debug(" Diameter message: NULL pointer"); 125 125 } else { 126 fd_log_debug(" Diameter message (%p) DUMP: \n", *diam_ans);126 fd_log_debug(" Diameter message (%p) DUMP:", *diam_ans); 127 127 fd_msg_dump_walk(0, *diam_ans); 128 128 } 129 129 130 130 if (!rad_fw || ! *rad_fw) { 131 fd_log_debug(" RADIUS answer: NULL pointer \n");131 fd_log_debug(" RADIUS answer: NULL pointer"); 132 132 } else { 133 fd_log_debug(" RADIUS answer (%p) DUMP: \n", *rad_fw);133 fd_log_debug(" RADIUS answer (%p) DUMP:", *rad_fw); 134 134 debug_dump_radius(*rad_fw); 135 135 } 136 136 137 fd_log_debug("=========== Debug%s%s%s complete ============= \n", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : "");137 fd_log_debug("=========== Debug%s%s%s complete =============", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); 138 138 return 0; 139 139 } -
extensions/app_radgw/rgwx_echodrop.c
r741 r974 60 60 TRACE_ENTRY("%p %p", conffile, state); 61 61 CHECK_PARAMS( state ); 62 CHECK_PARAMS_DO( conffile, { fd_log_debug("[echodrop.rgwx] The configuration file is not optional for this plugin. \n"); return EINVAL; } );62 CHECK_PARAMS_DO( conffile, { fd_log_debug("[echodrop.rgwx] The configuration file is not optional for this plugin."); return EINVAL; } ); 63 63 64 64 CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) ); … … 82 82 char * act = (eca->action == ACT_ECHO) ? "ECHO" : "DROP"; 83 83 if (eca->ext) { 84 fd_log_debug(" %s Code: %hhu, Vendor: %u, Ext-Type: %hu \n", act, eca->code, eca->vendor_id, eca->extype);84 fd_log_debug(" %s Code: %hhu, Vendor: %u, Ext-Type: %hu", act, eca->code, eca->vendor_id, eca->extype); 85 85 continue; 86 86 } 87 87 if (eca->tlv) { 88 fd_log_debug(" %s Code: %hhu, Vendor: %u, Type: %hhu \n", act, eca->code, eca->vendor_id, eca->type);88 fd_log_debug(" %s Code: %hhu, Vendor: %u, Type: %hhu", act, eca->code, eca->vendor_id, eca->type); 89 89 continue; 90 90 } 91 91 if (eca->vsa) { 92 fd_log_debug(" %s Code: %hhu, Vendor: %u \n", act, eca->code, eca->vendor_id);93 continue; 94 } 95 fd_log_debug(" %s Code: %hhu \n", act, eca->code);92 fd_log_debug(" %s Code: %hhu, Vendor: %u", act, eca->code, eca->vendor_id); 93 continue; 94 } 95 fd_log_debug(" %s Code: %hhu", act, eca->code); 96 96 } 97 97 } … … 186 186 if (eca->ext) { 187 187 /* To be done */ 188 fd_log_debug("Extended attributes are not implemented yet! \n");188 fd_log_debug("Extended attributes are not implemented yet!"); 189 189 ASSERT(0); 190 190 continue; … … 219 219 CHECK_PARAMS_DO(*session, 220 220 { 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). \n"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 222 " Please check your configuration file and include a session-generating extension BEFORE calling echodrop.rgwx to echo attributes.\n" 223 223 " Please use debug.rgwx to retrieve more information.\n" ); -
extensions/app_radgw/rgwx_echodrop.l
r741 r974 71 71 if (ret != 1) { 72 72 /* No matching: an error occurred */ 73 fd_log_debug("[echodrop.rgwx] Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));73 fd_log_debug("[echodrop.rgwx] Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 74 74 return LEX_ERROR; /* trig an error in yacc parser */ 75 75 /* Maybe we could REJECT instead of failing here? */ … … 93 93 /* Unrecognized character */ 94 94 <*>. { 95 fd_log_debug("[echodrop.rgwx] Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);95 fd_log_debug("[echodrop.rgwx] Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 96 96 return LEX_ERROR; 97 97 } -
extensions/app_radgw/rgwx_echodrop.y
r741 r974 78 78 if (rgwx_echodropin == NULL) { 79 79 ret = errno; 80 fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s \n", conffile, strerror(ret));80 fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s", conffile, strerror(ret)); 81 81 return ret; 82 82 } … … 97 97 { 98 98 if (ploc->first_line != ploc->last_line) 99 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);99 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 100 100 else if (ploc->first_column != ploc->last_column) 101 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);101 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 102 102 else 103 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);103 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 104 104 } 105 105 -
extensions/app_radgw/rgwx_sip.c
r924 r974 803 803 default: 804 804 (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT; 805 fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject \n",805 fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject", 806 806 ahdr->avp_value->u32, 807 807 sid->avp_value->os.len, sid->avp_value->os.data); -
extensions/app_redirect/ard_conf.l
r740 r974 82 82 if (ret != 1) { 83 83 /* No matching: an error occurred */ 84 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));84 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 85 85 return TOK_LEX_ERROR; /* trig an error in yacc parser */ 86 86 /* Maybe we could REJECT instead of failing here? */ … … 94 94 CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+2), 95 95 { 96 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));96 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 97 97 return TOK_LEX_ERROR; /* trig an error in yacc parser */ 98 98 } ); … … 107 107 CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+1), 108 108 { 109 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));109 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 110 110 return TOK_LEX_ERROR; /* trig an error in yacc parser */ 111 111 } ); … … 134 134 /* Unrecognized sequence, if it did not match any previous pattern */ 135 135 [^[:space:]\":=;\n]+ { 136 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);136 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 137 137 return TOK_LEX_ERROR; 138 138 } -
extensions/app_redirect/ard_conf.y
r740 r974 76 76 return; 77 77 78 fd_log_debug("app_redirect: configuration dump: \n");79 fd_log_debug(" default_redirect_cache_time : %u sec \n", ard_conf->default_rct);78 fd_log_debug("app_redirect: configuration dump:"); 79 fd_log_debug(" default_redirect_cache_time : %u sec", ard_conf->default_rct); 80 80 for (li = ard_conf->rules.next; li != &ard_conf->rules; li = li->next) { 81 81 ard_rule_dump(li->o); 82 82 } 83 fd_log_debug("app_redirect: end of configuration dump \n");83 fd_log_debug("app_redirect: end of configuration dump"); 84 84 } 85 85 -
extensions/app_redirect/ard_rules.c
r740 r974 54 54 { 55 55 struct fd_list * li; 56 fd_log_debug(" rule @%p: %s, %us \n", r, redir_type_str[r->type], r->rct);56 fd_log_debug(" rule @%p: %s, %us", r, redir_type_str[r->type], r->rct); 57 57 for (li = r->criteria.next; li != &r->criteria; li = li->next) { 58 58 struct ard_criteria * c = li->o; 59 fd_log_debug(" Criteria: ");60 59 switch (c->type) { 61 60 case FROM_ID: 62 fd_log_debug(" received from peer %s'%s'", c->is_regex?"REGEX":"", c->s);61 fd_log_debug(" Criteria: received from peer %s'%s'", c->is_regex?"REGEX":"", c->s); 63 62 break; 64 63 case FROM_REALM: 65 fd_log_debug(" received from realm %s'%s'", c->is_regex?"REGEX":"", c->s);64 fd_log_debug(" Criteria: received from realm %s'%s'", c->is_regex?"REGEX":"", c->s); 66 65 break; 67 66 case APP_ID: 68 fd_log_debug(" application id is %u", c->i);67 fd_log_debug(" Criteria: application id is %u", c->i); 69 68 break; 70 69 case AVP_INT: 71 fd_log_debug(" contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i);70 fd_log_debug(" Criteria: contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i); 72 71 break; 73 72 case AVP_STR: 74 fd_log_debug(" contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s);73 fd_log_debug(" Criteria: contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s); 75 74 break; 76 75 77 76 default: 78 fd_log_debug("invalid (%d)!", c->type); 79 } 80 fd_log_debug("\n"); 77 fd_log_debug(" Criteria: invalid (%d)!", c->type); 78 } 81 79 } 82 80 for (li = r->targets.next; li != &r->targets; li = li->next) { 83 81 struct ard_target * t = li->o; 84 fd_log_debug(" Redirect to: '%s' \n", t->s);82 fd_log_debug(" Redirect to: '%s'", t->s); 85 83 } 86 84 } -
extensions/app_sip/app_sip.l
r740 r974 79 79 if (ret != 1) { 80 80 /* No matching: an error occurred */ 81 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));81 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 82 82 return LEX_ERROR; /* trig an error in yacc parser */ 83 83 /* Maybe we could REJECT instead of failing here? */ … … 91 91 yylval->string = strdup(yytext+1); 92 92 if (!yylval->string) { 93 fd_log_debug("Unable to copy the string '%s': %s \n", yytext, strerror(errno));93 fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); 94 94 TRACE_DEBUG(INFO, "strdup failed"); 95 95 return LEX_ERROR; /* trig an error in yacc parser */ … … 156 156 /* Unrecognized sequence, if it did not match any previous pattern */ 157 157 [^[:space:]"*=>;\n]+ { 158 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);158 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 159 159 return LEX_ERROR; 160 160 } -
extensions/app_sip/app_sip.y
r740 r974 72 72 if (app_sipin == NULL) { 73 73 ret = errno; 74 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));74 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 75 75 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 76 76 return ret; … … 98 98 99 99 if (ploc->first_line != ploc->last_line) 100 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);100 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 101 101 else if (ploc->first_column != ploc->last_column) 102 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);102 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 103 103 else 104 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);104 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 105 105 } 106 106 -
extensions/dbg_interactive/dbg_interactive.c
r740 r974 61 61 CHECK_FCT_DO(fd_core_waitstartcomplete(), goto end); 62 62 63 fd_log_debug("\nStarting interactive python interpreter [experimental].\n"); 64 if (!arg) 65 fd_log_debug("Example syntax:\n >>> print cvar.fd_g_config.cnf_diamid\n '%s'\n", fd_g_config->cnf_diamid); 63 fd_log_debug("Starting interactive python interpreter [experimental]."); 64 if (!arg) { 65 fd_log_debug("Example syntax:"); 66 fd_log_debug(" >>> print cvar.fd_g_config.cnf_diamid"); 67 fd_log_debug(" '%s'", fd_g_config->cnf_diamid); 68 } 66 69 Py_Main(arg ? 2 : 1, dum); 67 70 -
extensions/dbg_monitor/dbg_monitor.c
r740 r974 61 61 #ifdef DEBUG 62 62 for (i++; i % 30; i++) { 63 fd_log_debug("[dbg_monitor] %ih%*im%*is \n", i/3600, 2, (i/60) % 60 , 2, i%60); /* This makes it easier to detect inactivity periods in the log file */63 fd_log_debug("[dbg_monitor] %ih%*im%*is", i/3600, 2, (i/60) % 60 , 2, i%60); /* This makes it easier to detect inactivity periods in the log file */ 64 64 sleep(1); 65 65 } … … 67 67 sleep(3600); /* 1 hour */ 68 68 #endif /* DEBUG */ 69 fd_log_debug("[dbg_monitor] Dumping current information \n");69 fd_log_debug("[dbg_monitor] Dumping current information"); 70 70 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_QUEUES, 0, NULL), /* continue */); 71 71 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_SERV, 0, NULL), /* continue */); … … 80 80 static void got_sig() 81 81 { 82 fd_log_debug("[dbg_monitor] Dumping extra information \n");82 fd_log_debug("[dbg_monitor] Dumping extra information"); 83 83 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_DICT, 0, NULL), /* continue */); 84 84 CHECK_FCT_DO(fd_event_send(fd_g_config->cnf_main_ev, FDEV_DUMP_CONFIG, 0, NULL), /* continue */); -
extensions/dbg_rt/dbg_rt.c
r741 r974 48 48 TRACE_ENTRY("%p %p", cbdata, msg); 49 49 50 fd_log_debug("[dbg_rt] FWD routing message: %p \n", msg ? *msg : NULL);50 fd_log_debug("[dbg_rt] FWD routing message: %p", msg ? *msg : NULL); 51 51 if (msg) 52 52 fd_msg_dump_walk(INFO, *msg); … … 62 62 TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); 63 63 64 fd_log_debug("[dbg_rt] OUT routing message: %p \n", msg);64 fd_log_debug("[dbg_rt] OUT routing message: %p", msg); 65 65 fd_msg_dump_walk(INFO, msg); 66 fd_log_debug("[dbg_rt] Current list of candidates (%p): (score - id) \n", msg);66 fd_log_debug("[dbg_rt] Current list of candidates (%p): (score - id)", msg); 67 67 68 68 for (li = candidates->next; li != candidates; li = li->next) { 69 69 struct rtd_candidate *c = (struct rtd_candidate *) li; 70 fd_log_debug("[dbg_rt] %d -\t%s \n", c->score, c->diamid);70 fd_log_debug("[dbg_rt] %d -\t%s", c->score, c->diamid); 71 71 } 72 72 -
extensions/dict_dcca/dict_dcca.c
- Property exe deleted
-
extensions/dict_legacy_xml/dict_lxml.l
r741 r974 80 80 CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), 81 81 { 82 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));82 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 83 83 return LEX_ERROR; /* trig an error in yacc parser */ 84 84 } ); … … 92 92 /* Unrecognized sequence, if it did not match any previous pattern */ 93 93 [^[:space:]\";\n]+ { 94 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);94 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 95 95 return LEX_ERROR; 96 96 } -
extensions/dict_legacy_xml/dict_lxml.y
r741 r974 72 72 if (dict_lxmlin == NULL) { 73 73 ret = errno; 74 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));74 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 75 75 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 76 76 return ret; … … 100 100 101 101 if (ploc->first_line != ploc->last_line) 102 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);102 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 103 103 else if (ploc->first_column != ploc->last_column) 104 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);104 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 105 105 else 106 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);106 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 107 107 } 108 108 -
extensions/dict_legacy_xml/dict_lxml_xml.c
r740 r974 123 123 124 124 static void dump_vendor(struct t_vend * v) { 125 fd_log_debug(" Vendor %d:'%s' \n", v->id, (char *)v->name);125 fd_log_debug(" Vendor %d:'%s'", v->id, (char *)v->name); 126 126 } 127 127 … … 175 175 if (r->max != -1) 176 176 fd_log_debug("M:%d ", r->max); 177 fd_log_debug("%s \n", (char *)r->avpname);177 fd_log_debug("%s", (char *)r->avpname); 178 178 } 179 179 … … 241 241 static void dump_cmd(struct t_cmd * c) { 242 242 struct fd_list * li; 243 fd_log_debug(" Command %d %s: %s \n", c->code,243 fd_log_debug(" Command %d %s: %s", c->code, 244 244 c->fmask ? ( c->flags ? "[P=1]" : "[P=0]") : "", c->name); 245 245 for (li = c->reqrules_fixed.next; li != &c->reqrules_fixed; li = li->next) … … 325 325 326 326 static void dump_type(struct t_typedefn * t) { 327 fd_log_debug(" Type %s ", (char *)t->name);328 if (t->parent_name)329 fd_log_debug("(parent: %s)", (char *)t->parent_name);330 fd_log_debug("\n");327 fd_log_debug(" Type %s%s%s%s", (char *)t->name, 328 t->parent_name ? "(parent: " : "", 329 t->parent_name ? (char *)t->parent_name : "", 330 t->parent_name ? ")" : ""); 331 331 } 332 332 … … 361 361 362 362 static void dump_avptype(struct t_avptype * t) { 363 fd_log_debug(" data type: %s \n", t->type_name);363 fd_log_debug(" data type: %s", t->type_name); 364 364 } 365 365 … … 398 398 399 399 static void dump_enum(struct t_enum * e) { 400 fd_log_debug(" Value: %d == %s \n", e->code, e->name);400 fd_log_debug(" Value: %d == %s", e->code, e->name); 401 401 } 402 402 … … 469 469 static void dump_avp(struct t_avp * a) { 470 470 struct fd_list * li; 471 fd_log_debug(" AVP %d %s%s: %s \n", a->code,471 fd_log_debug(" AVP %d %s%s: %s", a->code, 472 472 a->fmask & AVP_FLAG_MANDATORY ? ( a->flags & AVP_FLAG_MANDATORY ? "[M=1]" : "[M=0]") : "", 473 473 a->fmask & AVP_FLAG_VENDOR ? ( a->flags & AVP_FLAG_VENDOR ? "[V=1]" : "[V=0]") : "", 474 474 a->name); 475 475 if (a->fmask & AVP_FLAG_VENDOR) 476 fd_log_debug(" vendor: %d \n", a->vendor);476 fd_log_debug(" vendor: %d", a->vendor); 477 477 for (li = a->type.next; li != &a->type; li = li->next) 478 478 dump_avptype((struct t_avptype *)li); … … 561 561 static void dump_appl(struct t_appl * a) { 562 562 struct fd_list * li; 563 fd_log_debug(" Application %d: %s \n", a->id, a->name);563 fd_log_debug(" Application %d: %s", a->id, a->name); 564 564 for (li = a->commands.next; li != &a->commands; li = li->next) 565 565 dump_cmd((struct t_cmd *)li); … … 1021 1021 TRACE_DEBUG(INFO, "Error encountered while parsing tag of:"); 1022 1022 if (data->cur_app) 1023 fd_log_debug(" Application: '%s' \n", data->cur_app->name);1023 fd_log_debug(" Application: '%s'", data->cur_app->name); 1024 1024 if (data->cur_cmd) 1025 fd_log_debug(" Command : '%s' \n", data->cur_cmd->name);1025 fd_log_debug(" Command : '%s'", data->cur_cmd->name); 1026 1026 if (data->cur_avp) 1027 fd_log_debug(" AVP : '%s' \n", data->cur_avp->name);1027 fd_log_debug(" AVP : '%s'", data->cur_avp->name); 1028 1028 } 1029 1029 return; -
extensions/rt_default/rtd_conf.l
r741 r974 82 82 if (ret != 1) { 83 83 /* No matching: an error occurred */ 84 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));84 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 85 85 return LEX_ERROR; /* trig an error in yacc parser */ 86 86 /* Maybe we could REJECT instead of failing here? */ … … 107 107 CHECK_MALLOC_DO( yylval->string = strdup(yytext+2), 108 108 { 109 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));109 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 110 110 return LEX_ERROR; /* trig an error in yacc parser */ 111 111 } ); … … 119 119 CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), 120 120 { 121 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));121 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 122 122 return LEX_ERROR; /* trig an error in yacc parser */ 123 123 } ); … … 140 140 /* Unrecognized sequence, if it did not match any previous pattern */ 141 141 [^[:space:]\"*:=+;\n]+ { 142 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);142 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 143 143 return LEX_ERROR; 144 144 } -
extensions/rt_default/rtd_conf.y
r741 r974 71 71 if (rtd_confin == NULL) { 72 72 ret = errno; 73 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));73 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 74 74 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 75 75 return ret; … … 99 99 100 100 if (ploc->first_line != ploc->last_line) 101 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);101 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 102 102 else if (ploc->first_column != ploc->last_column) 103 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);103 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 104 104 else 105 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);105 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 106 106 } 107 107 -
extensions/rt_default/rtd_rules.c
r741 r974 158 158 static void dump_rule(int indent, struct rule * rule) 159 159 { 160 fd_log_debug("%*s%s%s%s += %d \n",160 fd_log_debug("%*s%s%s%s += %d", 161 161 indent, "", 162 162 rule->md.is_regex ? "[" : "'", … … 168 168 { 169 169 int i; 170 fd_log_debug("%*s%s%s%s : \n",170 fd_log_debug("%*s%s%s%s :", 171 171 indent, "", 172 172 target->md.is_regex ? "[" : "'", … … 176 176 if (! FD_IS_LIST_EMPTY(&target->rules[i])) { 177 177 struct fd_list * li; 178 fd_log_debug("%*s rules[%d]: \n",178 fd_log_debug("%*s rules[%d]:", 179 179 indent, "", i); 180 180 for (li = target->rules[i].next; li != &target->rules[i]; li = li->next) { … … 594 594 { 595 595 int i; 596 fd_log_debug("[rt_default] Dumping rules repository... \n");596 fd_log_debug("[rt_default] Dumping rules repository..."); 597 597 for (i = 0; i < RTD_TAR_MAX; i++) { 598 598 if (!FD_IS_LIST_EMPTY( &TARGETS[i] )) { 599 599 struct fd_list * li; 600 fd_log_debug(" Targets list %d: \n", i);600 fd_log_debug(" Targets list %d:", i); 601 601 for (li = TARGETS[i].next; li != &TARGETS[i]; li = li->next) { 602 602 dump_target(4, (struct target *)li); … … 605 605 } 606 606 607 fd_log_debug("[rt_default] End of dump \n");608 } 607 fd_log_debug("[rt_default] End of dump"); 608 } -
extensions/rt_ereg/rtereg_conf.l
r741 r974 81 81 CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), 82 82 { 83 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s \n", yytext, strerror(errno));83 TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); 84 84 return LEX_ERROR; /* trig an error in yacc parser */ 85 85 } ); … … 96 96 if (ret != 1) { 97 97 /* No matching: an error occurred */ 98 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));98 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 99 99 return LEX_ERROR; /* trig an error in yacc parser */ 100 100 /* Maybe we could REJECT instead of failing here? */ … … 113 113 /* Unrecognized sequence, if it did not match any previous pattern */ 114 114 [^[:space:]\":=+;\n]+ { 115 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);115 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 116 116 return LEX_ERROR; 117 117 } -
extensions/rt_ereg/rtereg_conf.y
r741 r974 68 68 if (rtereg_confin == NULL) { 69 69 ret = errno; 70 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));70 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 71 71 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 72 72 return ret; … … 96 96 97 97 if (ploc->first_line != ploc->last_line) 98 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);98 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 99 99 else if (ploc->first_column != ploc->last_column) 100 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);100 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 101 101 else 102 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);102 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 103 103 } 104 104 -
extensions/test_acct/test_acct.c
r740 r974 73 73 CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); 74 74 75 fd_log_debug("--------------Received the following Accounting message:-------------- \n");75 fd_log_debug("--------------Received the following Accounting message:--------------"); 76 76 77 77 CHECK_FCT( fd_sess_getsid ( sess, &s, &sl ) ); 78 fd_log_debug("Session: %.*s \n", (int)sl, s);78 fd_log_debug("Session: %.*s", (int)sl, s); 79 79 80 80 /* The AVPs that we copy in the answer */ … … 82 82 if (a) { 83 83 CHECK_FCT( fd_msg_avp_hdr( a, &h ) ); 84 fd_log_debug("Accounting-Record-Type: %d (%s) \n", h->avp_value->u32,84 fd_log_debug("Accounting-Record-Type: %d (%s)", h->avp_value->u32, 85 85 /* it would be better to search this in the dictionary, but it is only for debug, so ok */ 86 86 (h->avp_value->u32 == 1) ? "EVENT_RECORD" : … … 97 97 if (a) { 98 98 CHECK_FCT( fd_msg_avp_hdr( a, &h ) ); 99 fd_log_debug("Accounting-Record-Number: %d \n", h->avp_value->u32);99 fd_log_debug("Accounting-Record-Number: %d", h->avp_value->u32); 100 100 CHECK_FCT( fd_msg_avp_new ( tac_dict.Accounting_Record_Number, 0, &a ) ); 101 101 CHECK_FCT( fd_msg_avp_setvalue( a, h->avp_value ) ); … … 105 105 /* We may also dump other data from the message, such as Accounting session Id, number of packets, ... */ 106 106 107 fd_log_debug("---------------------------------------------------------------------- \n");107 fd_log_debug("----------------------------------------------------------------------"); 108 108 109 109 /* Send the answer */ -
extensions/test_app/ta_bench.c
r928 r974 236 236 237 237 /* Now, display the statistics */ 238 fd_log_debug( "------- app_test Benchmark result --------- \n");238 fd_log_debug( "------- app_test Benchmark result ---------"); 239 239 if (now.tv_nsec >= end_time.tv_nsec) { 240 fd_log_debug( " Executing for: %d.%06ld sec \n",240 fd_log_debug( " Executing for: %d.%06ld sec", 241 241 (int)(now.tv_sec + ta_conf->bench_duration - end_time.tv_sec), 242 242 (long)(now.tv_nsec - end_time.tv_nsec) / 1000); 243 243 } else { 244 fd_log_debug( " Executing for: %d.%06ld sec \n",244 fd_log_debug( " Executing for: %d.%06ld sec", 245 245 (int)(now.tv_sec + ta_conf->bench_duration - 1 - end_time.tv_sec), 246 246 (long)(now.tv_nsec + 1000000000 - end_time.tv_nsec) / 1000); 247 247 } 248 fd_log_debug( " %llu messages sent \n", end.nb_sent - start.nb_sent);249 fd_log_debug( " %llu error(s) received \n", end.nb_errs - start.nb_errs);250 fd_log_debug( " %llu answer(s) received \n", end.nb_recv - start.nb_recv);251 fd_log_debug( " Overall: \n");252 fd_log_debug( " fastest: %ld.%06ld sec. \n", end.shortest / 1000000, end.shortest % 1000000);253 fd_log_debug( " slowest: %ld.%06ld sec. \n", end.longest / 1000000, end.longest % 1000000);254 fd_log_debug( " Average: %ld.%06ld sec. \n", end.avg / 1000000, end.avg % 1000000);255 fd_log_debug( " Throughput: %llu messages / sec \n", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000)));256 fd_log_debug( "------------------------------------- \n");248 fd_log_debug( " %llu messages sent", end.nb_sent - start.nb_sent); 249 fd_log_debug( " %llu error(s) received", end.nb_errs - start.nb_errs); 250 fd_log_debug( " %llu answer(s) received", end.nb_recv - start.nb_recv); 251 fd_log_debug( " Overall:"); 252 fd_log_debug( " fastest: %ld.%06ld sec.", end.shortest / 1000000, end.shortest % 1000000); 253 fd_log_debug( " slowest: %ld.%06ld sec.", end.longest / 1000000, end.longest % 1000000); 254 fd_log_debug( " Average: %ld.%06ld sec.", end.avg / 1000000, end.avg % 1000000); 255 fd_log_debug( " Throughput: %llu messages / sec", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000))); 256 fd_log_debug( "-------------------------------------"); 257 257 258 258 } -
extensions/test_app/ta_conf.l
r740 r974 81 81 if (ret != 1) { 82 82 /* No matching: an error occurred */ 83 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));83 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 84 84 return LEX_ERROR; /* trig an error in yacc parser */ 85 85 /* Maybe we could REJECT instead of failing here? */ … … 93 93 yylval->string = strdup(yytext+1); 94 94 if (!yylval->string) { 95 fd_log_debug("Unable to copy the string '%s': %s \n", yytext, strerror(errno));95 fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); 96 96 TRACE_DEBUG(INFO, "strdup failed"); 97 97 return LEX_ERROR; /* trig an error in yacc parser */ … … 163 163 /* Unrecognized sequence, if it did not match any previous pattern */ 164 164 [^[:space:]"*=>;\n]+ { 165 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);165 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 166 166 return LEX_ERROR; 167 167 } -
extensions/test_app/ta_conf.y
r740 r974 72 72 if (ta_confin == NULL) { 73 73 ret = errno; 74 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));74 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 75 75 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 76 76 return ret; … … 98 98 99 99 if (ploc->first_line != ploc->last_line) 100 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);100 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 101 101 else if (ploc->first_column != ploc->last_column) 102 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);102 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 103 103 else 104 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);104 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 105 105 } 106 106 -
extensions/test_app/ta_serv.c
r741 r974 47 47 TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); 48 48 49 fd_log_debug("Unexpected message received! \n");49 fd_log_debug("Unexpected message received!"); 50 50 51 51 return ENOTSUP; -
extensions/test_app/test_app.c
r741 r974 72 72 if (!TRACE_BOOL(INFO)) 73 73 return; 74 fd_log_debug( "------- app_test configuration dump: --------- \n");75 fd_log_debug( " Vendor Id .......... : %u \n", ta_conf->vendor_id);76 fd_log_debug( " Application Id ..... : %u \n", ta_conf->appli_id);77 fd_log_debug( " Command Id ......... : %u \n", ta_conf->cmd_id);78 fd_log_debug( " AVP Id ............. : %u \n", ta_conf->avp_id);79 fd_log_debug( " Mode ............... : %s%s%s \n", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "", ta_conf->mode & MODE_BENCH ? " (Benchmark)" : "");80 fd_log_debug( " Destination Realm .. : %s \n", ta_conf->dest_realm ?: "- none -");81 fd_log_debug( " Destination Host ... : %s \n", ta_conf->dest_host ?: "- none -");82 fd_log_debug( " Signal ............. : %i \n", ta_conf->signal);83 fd_log_debug( "------- /app_test configuration dump --------- \n");74 fd_log_debug( "------- app_test configuration dump: ---------"); 75 fd_log_debug( " Vendor Id .......... : %u", ta_conf->vendor_id); 76 fd_log_debug( " Application Id ..... : %u", ta_conf->appli_id); 77 fd_log_debug( " Command Id ......... : %u", ta_conf->cmd_id); 78 fd_log_debug( " AVP Id ............. : %u", ta_conf->avp_id); 79 fd_log_debug( " Mode ............... : %s%s%s", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "", ta_conf->mode & MODE_BENCH ? " (Benchmark)" : ""); 80 fd_log_debug( " Destination Realm .. : %s", ta_conf->dest_realm ?: "- none -"); 81 fd_log_debug( " Destination Host ... : %s", ta_conf->dest_host ?: "- none -"); 82 fd_log_debug( " Signal ............. : %i", ta_conf->signal); 83 fd_log_debug( "------- /app_test configuration dump ---------"); 84 84 } 85 85 … … 107 107 108 108 /* Now, display everything */ 109 fd_log_debug( "------- app_test statistics --------- \n");109 fd_log_debug( "------- app_test statistics ---------"); 110 110 if (now.tv_nsec >= start.tv_nsec) { 111 fd_log_debug( " Executing for: %d.%06ld sec \n",111 fd_log_debug( " Executing for: %d.%06ld sec", 112 112 (int)(now.tv_sec - start.tv_sec), 113 113 (long)(now.tv_nsec - start.tv_nsec) / 1000); 114 114 } else { 115 fd_log_debug( " Executing for: %d.%06ld sec \n",115 fd_log_debug( " Executing for: %d.%06ld sec", 116 116 (int)(now.tv_sec - 1 - start.tv_sec), 117 117 (long)(now.tv_nsec + 1000000000 - start.tv_nsec) / 1000); … … 119 119 120 120 if (ta_conf->mode & MODE_SERV) { 121 fd_log_debug( " Server: %llu message(s) echoed \n", copy.nb_echoed);121 fd_log_debug( " Server: %llu message(s) echoed", copy.nb_echoed); 122 122 } 123 123 if (ta_conf->mode & MODE_CLI) { 124 fd_log_debug( " Client: \n");125 fd_log_debug( " %llu message(s) sent \n", copy.nb_sent);126 fd_log_debug( " %llu error(s) received \n", copy.nb_errs);127 fd_log_debug( " %llu answer(s) received \n", copy.nb_recv);128 fd_log_debug( " fastest: %ld.%06ld sec. \n", copy.shortest / 1000000, copy.shortest % 1000000);129 fd_log_debug( " slowest: %ld.%06ld sec. \n", copy.longest / 1000000, copy.longest % 1000000);130 fd_log_debug( " Average: %ld.%06ld sec. \n", copy.avg / 1000000, copy.avg % 1000000);124 fd_log_debug( " Client:"); 125 fd_log_debug( " %llu message(s) sent", copy.nb_sent); 126 fd_log_debug( " %llu error(s) received", copy.nb_errs); 127 fd_log_debug( " %llu answer(s) received", copy.nb_recv); 128 fd_log_debug( " fastest: %ld.%06ld sec.", copy.shortest / 1000000, copy.shortest % 1000000); 129 fd_log_debug( " slowest: %ld.%06ld sec.", copy.longest / 1000000, copy.longest % 1000000); 130 fd_log_debug( " Average: %ld.%06ld sec.", copy.avg / 1000000, copy.avg % 1000000); 131 131 } 132 fd_log_debug( "------------------------------------- \n");132 fd_log_debug( "-------------------------------------"); 133 133 } 134 134 -
extensions/test_netemul/test_netemul.l
r740 r974 78 78 if (ret != 1) { 79 79 /* No matching: an error occurred */ 80 fd_log_debug("Unable to convert the value '%s' to a valid float: %s \n", yytext, strerror(errno));80 fd_log_debug("Unable to convert the value '%s' to a valid float: %s", yytext, strerror(errno)); 81 81 return LEX_ERROR; /* trig an error in yacc parser */ 82 82 /* Maybe we could REJECT instead of failing here? */ … … 92 92 if (ret != 1) { 93 93 /* No matching: an error occurred */ 94 fd_log_debug("Unable to convert the value '%s' to a valid long: %s \n", yytext, strerror(errno));94 fd_log_debug("Unable to convert the value '%s' to a valid long: %s", yytext, strerror(errno)); 95 95 return LEX_ERROR; /* trig an error in yacc parser */ 96 96 /* Maybe we could REJECT instead of failing here? */ … … 113 113 /* Unrecognized sequence, if it did not match any previous pattern */ 114 114 [^[:space:][:digit:]=;%/\n]+ { 115 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);115 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 116 116 return LEX_ERROR; 117 117 } -
extensions/test_netemul/test_netemul.y
r740 r974 68 68 if (test_netemulin == NULL) { 69 69 ret = errno; 70 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));70 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 71 71 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 72 72 return ret; … … 96 96 97 97 if (ploc->first_line != ploc->last_line) 98 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);98 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 99 99 else if (ploc->first_column != ploc->last_column) 100 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);100 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 101 101 else 102 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);102 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 103 103 } 104 104 -
extensions/test_sip/test_sip.l
r740 r974 79 79 if (ret != 1) { 80 80 /* No matching: an error occurred */ 81 fd_log_debug("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));81 fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 82 82 return LEX_ERROR; /* trig an error in yacc parser */ 83 83 /* Maybe we could REJECT instead of failing here? */ … … 91 91 yylval->string = strdup(yytext+1); 92 92 if (!yylval->string) { 93 fd_log_debug("Unable to copy the string '%s': %s \n", yytext, strerror(errno));93 fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); 94 94 TRACE_DEBUG(INFO, "strdup failed"); 95 95 return LEX_ERROR; /* trig an error in yacc parser */ … … 131 131 /* Unrecognized sequence, if it did not match any previous pattern */ 132 132 [^[:space:]"*=>;\n]+ { 133 fd_log_debug("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);133 fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 134 134 return LEX_ERROR; 135 135 } -
extensions/test_sip/test_sip.y
r740 r974 70 70 if (test_sipin == NULL) { 71 71 ret = errno; 72 fd_log_debug("Unable to open extension configuration file %s for reading: %s \n", conffile, strerror(ret));72 fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); 73 73 TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); 74 74 return ret; … … 96 96 97 97 if (ploc->first_line != ploc->last_line) 98 fd_log_debug("%s:%d.%d-%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);98 fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 99 99 else if (ploc->first_column != ploc->last_column) 100 fd_log_debug("%s:%d.%d-%d : %s \n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);100 fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); 101 101 else 102 fd_log_debug("%s:%d.%d : %s \n", conffile, ploc->first_line, ploc->first_column, s);102 fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); 103 103 } 104 104 -
libfdcore/cnxctx.c
r961 r974 231 231 char buf[1024]; 232 232 sSA_DUMP_NODE( buf, sizeof(buf), &ss, NI_NUMERICHOST ); 233 fd_log_debug("%s : accepted new client [%s]. \n", fd_cnx_getid(serv), buf);233 fd_log_debug("%s : accepted new client [%s].", fd_cnx_getid(serv), buf); 234 234 } 235 235 … … 314 314 char buf[1024]; 315 315 sSA_DUMP_NODE_SERV( buf, sizeof(buf), sa, NI_NUMERICSERV); 316 fd_log_debug("Connection established to server '%s' (TCP:%d). \n", buf, sock);316 fd_log_debug("Connection established to server '%s' (TCP:%d).", buf, sock); 317 317 } 318 318 … … 406 406 char buf[1024]; 407 407 sSA_DUMP_NODE_SERV( buf, sizeof(buf), &primary, NI_NUMERICSERV); 408 fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams). \n", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out);408 fd_log_debug("Connection established to server '%s' (SCTP:%d, %d/%d streams).", buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out); 409 409 } 410 410 … … 857 857 { 858 858 if (TRACE_BOOL(INFO)) { 859 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s \n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));859 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); 860 860 } 861 861 goto end; … … 902 902 { 903 903 if (TRACE_BOOL(INFO)) { 904 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s \n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));904 fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); 905 905 } 906 906 goto end; … … 1038 1038 const char * errorpos; 1039 1039 CHECK_GNUTLS_DO( gnutls_priority_set_direct( *session, priority, &errorpos ), 1040 { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s' \n", priority, errorpos); return EINVAL; } );1040 { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'", priority, errorpos); return EINVAL; } ); 1041 1041 } else { 1042 1042 CHECK_GNUTLS_DO( gnutls_priority_set( *session, fd_g_config->cnf_sec_data.prio_cache ), return EINVAL ); … … 1075 1075 gnutls_credentials_type_t cred; 1076 1076 1077 fd_log_debug("TLS Session information for connection '%s': \n", conn->cc_id);1077 fd_log_debug("TLS Session information for connection '%s':", conn->cc_id); 1078 1078 1079 1079 /* print the key exchange's algorithm name */ 1080 1080 GNUTLS_TRACE( kx = gnutls_kx_get (session) ); 1081 1081 GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) ); 1082 fd_log_debug("\t - Key Exchange: %s \n", tmp);1082 fd_log_debug("\t - Key Exchange: %s", tmp); 1083 1083 1084 1084 /* Check the authentication type used and switch … … 1088 1088 { 1089 1089 case GNUTLS_CRD_IA: 1090 fd_log_debug("\t - TLS/IA session \n");1090 fd_log_debug("\t - TLS/IA session"); 1091 1091 break; 1092 1092 … … 1094 1094 /* This returns NULL in server side. */ 1095 1095 if (gnutls_psk_client_get_hint (session) != NULL) 1096 fd_log_debug("\t - PSK authentication. PSK hint '%s' \n",1096 fd_log_debug("\t - PSK authentication. PSK hint '%s'", 1097 1097 gnutls_psk_client_get_hint (session)); 1098 1098 /* This returns NULL in client side. */ 1099 1099 if (gnutls_psk_server_get_username (session) != NULL) 1100 fd_log_debug("\t - PSK authentication. Connected as '%s' \n",1100 fd_log_debug("\t - PSK authentication. Connected as '%s'", 1101 1101 gnutls_psk_server_get_username (session)); 1102 1102 break; 1103 1103 1104 1104 case GNUTLS_CRD_ANON: /* anonymous authentication */ 1105 fd_log_debug("\t - Anonymous DH using prime of %d bits \n",1105 fd_log_debug("\t - Anonymous DH using prime of %d bits", 1106 1106 gnutls_dh_get_prime_bits (session)); 1107 1107 break; … … 1110 1110 /* Check if we have been using ephemeral Diffie-Hellman. */ 1111 1111 if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) { 1112 fd_log_debug("\t - Ephemeral DH using prime of %d bits \n",1112 fd_log_debug("\t - Ephemeral DH using prime of %d bits", 1113 1113 gnutls_dh_get_prime_bits (session)); 1114 1114 } … … 1116 1116 #ifdef ENABLE_SRP 1117 1117 case GNUTLS_CRD_SRP: 1118 fd_log_debug("\t - SRP session with username %s \n",1118 fd_log_debug("\t - SRP session with username %s", 1119 1119 gnutls_srp_server_get_username (session)); 1120 1120 break; … … 1122 1122 1123 1123 default: 1124 fd_log_debug("\t - Different type of credentials for the session (%d). \n", cred);1124 fd_log_debug("\t - Different type of credentials for the session (%d).", cred); 1125 1125 break; 1126 1126 … … 1129 1129 /* print the protocol's name (ie TLS 1.0) */ 1130 1130 tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session)); 1131 fd_log_debug("\t - Protocol: %s \n", tmp);1131 fd_log_debug("\t - Protocol: %s", tmp); 1132 1132 1133 1133 /* print the certificate type of the peer. ie X.509 */ 1134 1134 tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session)); 1135 fd_log_debug("\t - Certificate Type: %s \n", tmp);1135 fd_log_debug("\t - Certificate Type: %s", tmp); 1136 1136 1137 1137 /* print the compression algorithm (if any) */ 1138 1138 tmp = gnutls_compression_get_name (gnutls_compression_get (session)); 1139 fd_log_debug("\t - Compression: %s \n", tmp);1139 fd_log_debug("\t - Compression: %s", tmp); 1140 1140 1141 1141 /* print the name of the cipher used. ie 3DES. */ 1142 1142 tmp = gnutls_cipher_get_name (gnutls_cipher_get (session)); 1143 fd_log_debug("\t - Cipher: %s \n", tmp);1143 fd_log_debug("\t - Cipher: %s", tmp); 1144 1144 1145 1145 /* Print the MAC algorithms name. ie SHA1 */ 1146 1146 tmp = gnutls_mac_get_name (gnutls_mac_get (session)); 1147 fd_log_debug("\t - MAC: %s \n", tmp);1147 fd_log_debug("\t - MAC: %s", tmp); 1148 1148 } 1149 1149 … … 1152 1152 if (gtret) { 1153 1153 if (TRACE_BOOL(INFO)) { 1154 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1154 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1155 1155 if (gtret & GNUTLS_CERT_INVALID) 1156 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?) \n");1156 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)"); 1157 1157 if (gtret & GNUTLS_CERT_REVOKED) 1158 fd_log_debug(" - The certificate has been revoked. \n");1158 fd_log_debug(" - The certificate has been revoked."); 1159 1159 if (gtret & GNUTLS_CERT_SIGNER_NOT_FOUND) 1160 fd_log_debug(" - The certificate hasn't got a known issuer. \n");1160 fd_log_debug(" - The certificate hasn't got a known issuer."); 1161 1161 if (gtret & GNUTLS_CERT_SIGNER_NOT_CA) 1162 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints. \n");1162 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); 1163 1163 if (gtret & GNUTLS_CERT_INSECURE_ALGORITHM) 1164 fd_log_debug(" - The certificate signature uses a weak algorithm. \n");1164 fd_log_debug(" - The certificate signature uses a weak algorithm."); 1165 1165 } 1166 1166 return EINVAL; … … 1184 1184 time_t expiration_time, activation_time; 1185 1185 1186 fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided): \n", conn->cc_id, cert_list_size);1186 fd_log_debug("TLS Certificate information for connection '%s' (%d certs provided):", conn->cc_id, cert_list_size); 1187 1187 for (i = 0; i < cert_list_size; i++) 1188 1188 { … … 1191 1191 CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[i], GNUTLS_X509_FMT_DER), return EINVAL); 1192 1192 1193 fd_log_debug(" Certificate %d info: \n", i);1193 fd_log_debug(" Certificate %d info:", i); 1194 1194 1195 1195 GNUTLS_TRACE( expiration_time = gnutls_x509_crt_get_expiration_time (cert) ); … … 1203 1203 gnutls_x509_crt_get_serial (cert, serial, &size); 1204 1204 1205 fd_log_debug("\t - Certificate serial number: ");1206 1205 { 1207 1206 int j; 1207 char buf[1024]; 1208 snprintf(buf, sizeof(buf), "\t - Certificate serial number: "); 1208 1209 for (j = 0; j < size; j++) { 1209 fd_log_debug("%02.2hhx", serial[j]);1210 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02.2hhx", serial[j]); 1210 1211 } 1211 }1212 fd_log_debug("\n");1212 fd_log_debug(buf); 1213 } 1213 1214 1214 1215 /* Extract some of the public key algorithm's parameters */ 1215 1216 GNUTLS_TRACE( algo = gnutls_x509_crt_get_pk_algorithm (cert, &bits) ); 1216 fd_log_debug("\t - Certificate public key: %s \n",1217 fd_log_debug("\t - Certificate public key: %s", 1217 1218 gnutls_pk_algorithm_get_name (algo)); 1218 1219 1219 1220 /* Print the version of the X.509 certificate. */ 1220 fd_log_debug("\t - Certificate version: #%d \n",1221 fd_log_debug("\t - Certificate version: #%d", 1221 1222 gnutls_x509_crt_get_version (cert)); 1222 1223 1223 1224 size = sizeof (dn); 1224 1225 GNUTLS_TRACE( gnutls_x509_crt_get_dn (cert, dn, &size) ); 1225 fd_log_debug("\t - DN: %s \n", dn);1226 fd_log_debug("\t - DN: %s", dn); 1226 1227 1227 1228 size = sizeof (dn); 1228 1229 GNUTLS_TRACE( gnutls_x509_crt_get_issuer_dn (cert, dn, &size) ); 1229 fd_log_debug("\t - Issuer's DN: %s \n", dn);1230 fd_log_debug("\t - Issuer's DN: %s", dn); 1230 1231 1231 1232 GNUTLS_TRACE( gnutls_x509_crt_deinit (cert) ); … … 1244 1245 if ((deadline != (time_t)-1) && (deadline < now)) { 1245 1246 if (TRACE_BOOL(INFO)) { 1246 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1247 fd_log_debug(" - The certificate %d in the chain is expired \n", i);1247 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1248 fd_log_debug(" - The certificate %d in the chain is expired", i); 1248 1249 } 1249 1250 ret = EINVAL; … … 1253 1254 if ((deadline != (time_t)-1) && (deadline > now)) { 1254 1255 if (TRACE_BOOL(INFO)) { 1255 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1256 fd_log_debug(" - The certificate %d in the chain is not yet activated \n", i);1256 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1257 fd_log_debug(" - The certificate %d in the chain is not yet activated", i); 1257 1258 } 1258 1259 ret = EINVAL; … … 1262 1263 if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { 1263 1264 if (TRACE_BOOL(INFO)) { 1264 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1265 fd_log_debug(" - The certificate hostname does not match '%s' \n", conn->cc_tls_para.cn);1265 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1266 fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); 1266 1267 } 1267 1268 ret = EINVAL; … … 1302 1303 dhe = ecdh = 0; 1303 1304 1304 fd_log_debug("TLS Session information for connection '%s': \n", conn->cc_id);1305 fd_log_debug("TLS Session information for connection '%s':", conn->cc_id); 1305 1306 1306 1307 /* print the key exchange's algorithm name … … 1308 1309 GNUTLS_TRACE( kx = gnutls_kx_get (session) ); 1309 1310 GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) ); 1310 fd_log_debug("\t- Key Exchange: %s \n", tmp);1311 fd_log_debug("\t- Key Exchange: %s", tmp); 1311 1312 1312 1313 /* Check the authentication type used and switch … … 1317 1318 { 1318 1319 case GNUTLS_CRD_IA: 1319 fd_log_debug("\t - TLS/IA session \n");1320 fd_log_debug("\t - TLS/IA session"); 1320 1321 break; 1321 1322 … … 1323 1324 #if (defined(ENABLE_SRP) || defined(GNUTLS_VERSION_300)) 1324 1325 case GNUTLS_CRD_SRP: 1325 fd_log_debug("\t - SRP session with username %s \n",1326 fd_log_debug("\t - SRP session with username %s", 1326 1327 gnutls_srp_server_get_username (session)); 1327 1328 break; … … 1332 1333 */ 1333 1334 if (gnutls_psk_client_get_hint (session) != NULL) 1334 fd_log_debug("\t - PSK authentication. PSK hint '%s' \n",1335 fd_log_debug("\t - PSK authentication. PSK hint '%s'", 1335 1336 gnutls_psk_client_get_hint (session)); 1336 1337 /* This returns NULL in client side. 1337 1338 */ 1338 1339 if (gnutls_psk_server_get_username (session) != NULL) 1339 fd_log_debug("\t - PSK authentication. Connected as '%s' \n",1340 fd_log_debug("\t - PSK authentication. Connected as '%s'", 1340 1341 gnutls_psk_server_get_username (session)); 1341 1342 … … 1347 1348 1348 1349 case GNUTLS_CRD_ANON: /* anonymous authentication */ 1349 fd_log_debug("\t - Anonymous DH using prime of %d bits \n",1350 fd_log_debug("\t - Anonymous DH using prime of %d bits", 1350 1351 gnutls_dh_get_prime_bits (session)); 1351 1352 if (kx == GNUTLS_KX_ANON_ECDH) … … 1370 1371 cert_list = gnutls_certificate_get_peers (session, &cert_list_size); 1371 1372 1372 fd_log_debug("\t Peer provided %d certificates. \n", cert_list_size);1373 fd_log_debug("\t Peer provided %d certificates.", cert_list_size); 1373 1374 1374 1375 if (cert_list_size > 0) … … 1382 1383 gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER); 1383 1384 1384 fd_log_debug("\t Certificate info: \n");1385 fd_log_debug("\t Certificate info:"); 1385 1386 1386 1387 /* This is the preferred way of printing short information about … … 1390 1391 if (ret == 0) 1391 1392 { 1392 fd_log_debug("\t\t%s \n", cinfo.data);1393 fd_log_debug("\t\t%s", cinfo.data); 1393 1394 gnutls_free (cinfo.data); 1394 1395 } … … 1396 1397 if (conn->cc_tls_para.cn) { 1397 1398 if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { 1398 fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1399 fd_log_debug("\t - The certificate hostname does not match '%s' \n", conn->cc_tls_para.cn);1399 fd_log_debug("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1400 fd_log_debug("\t - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); 1400 1401 gnutls_x509_crt_deinit (cert); 1401 1402 return GNUTLS_E_CERTIFICATE_ERROR; … … 1415 1416 1416 1417 if (ecdh != 0) 1417 fd_log_debug("\t - Ephemeral ECDH using curve %s \n",1418 fd_log_debug("\t - Ephemeral ECDH using curve %s", 1418 1419 gnutls_ecc_curve_get_name (gnutls_ecc_curve_get (session))); 1419 1420 else if (dhe != 0) 1420 fd_log_debug("\t - Ephemeral DH using prime of %d bits \n",1421 fd_log_debug("\t - Ephemeral DH using prime of %d bits", 1421 1422 gnutls_dh_get_prime_bits (session)); 1422 1423 … … 1424 1425 */ 1425 1426 tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session)); 1426 fd_log_debug("\t - Protocol: %s \n", tmp);1427 fd_log_debug("\t - Protocol: %s", tmp); 1427 1428 1428 1429 /* print the certificate type of the peer. … … 1430 1431 */ 1431 1432 tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session)); 1432 fd_log_debug("\t - Certificate Type: %s \n", tmp);1433 fd_log_debug("\t - Certificate Type: %s", tmp); 1433 1434 1434 1435 /* print the compression algorithm (if any) 1435 1436 */ 1436 1437 tmp = gnutls_compression_get_name (gnutls_compression_get (session)); 1437 fd_log_debug("\t - Compression: %s \n", tmp);1438 fd_log_debug("\t - Compression: %s", tmp); 1438 1439 1439 1440 /* print the name of the cipher used. … … 1441 1442 */ 1442 1443 tmp = gnutls_cipher_get_name (gnutls_cipher_get (session)); 1443 fd_log_debug("\t - Cipher: %s \n", tmp);1444 fd_log_debug("\t - Cipher: %s", tmp); 1444 1445 1445 1446 /* Print the MAC algorithms name. … … 1447 1448 */ 1448 1449 tmp = gnutls_mac_get_name (gnutls_mac_get (session)); 1449 fd_log_debug("\t - MAC: %s \n", tmp);1450 fd_log_debug("\t - MAC: %s", tmp); 1450 1451 1451 1452 } … … 1456 1457 CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, &status), return GNUTLS_E_CERTIFICATE_ERROR ); 1457 1458 if (TRACE_BOOL(INFO) && (status & GNUTLS_CERT_INVALID)) { 1458 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1459 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1459 1460 if (status & GNUTLS_CERT_SIGNER_NOT_FOUND) 1460 fd_log_debug(" - The certificate hasn't got a known issuer. \n");1461 fd_log_debug(" - The certificate hasn't got a known issuer."); 1461 1462 1462 1463 if (status & GNUTLS_CERT_REVOKED) 1463 fd_log_debug(" - The certificate has been revoked. \n");1464 fd_log_debug(" - The certificate has been revoked."); 1464 1465 1465 1466 if (status & GNUTLS_CERT_EXPIRED) 1466 fd_log_debug(" - The certificate has expired. \n");1467 fd_log_debug(" - The certificate has expired."); 1467 1468 1468 1469 if (status & GNUTLS_CERT_NOT_ACTIVATED) 1469 fd_log_debug(" - The certificate is not yet activated. \n");1470 fd_log_debug(" - The certificate is not yet activated."); 1470 1471 } 1471 1472 if (status & GNUTLS_CERT_INVALID) … … 1480 1481 if ((!hostname_verified) && (conn->cc_tls_para.cn)) { 1481 1482 if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) { 1482 TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1483 TRACE_DEBUG(INFO, "TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1483 1484 return GNUTLS_E_CERTIFICATE_ERROR; 1484 1485 } … … 1493 1494 if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { 1494 1495 if (TRACE_BOOL(INFO)) { 1495 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') : \n", conn->cc_socket, conn->cc_remid, conn->cc_id);1496 fd_log_debug(" - The certificate hostname does not match '%s' \n", conn->cc_tls_para.cn);1496 fd_log_debug("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); 1497 fd_log_debug(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); 1497 1498 } 1498 1499 gnutls_x509_crt_deinit (cert); … … 1573 1574 { 1574 1575 if (TRACE_BOOL(INFO)) { 1575 fd_log_debug("TLS Handshake failed on socket %d (%s) : %s \n", conn->cc_socket, conn->cc_id, gnutls_strerror(ret));1576 fd_log_debug("TLS Handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); 1576 1577 } 1577 1578 fd_cnx_markerror(conn); -
libfdcore/config.c
r965 r974 86 86 return; 87 87 88 fd_log_debug("-- Configuration : \n");89 fd_log_debug(" Debug trace level ...... : %+d \n", fd_g_debug_lvl);90 fd_log_debug(" Configuration file ..... : %s \n", fd_g_config->cnf_file);91 fd_log_debug(" Diameter Identity ...... : %s (l:%Zi) \n", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len);92 fd_log_debug(" Diameter Realm ......... : %s (l:%Zi) \n", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len);93 fd_log_debug(" Tc Timer ............... : %u \n", fd_g_config->cnf_timer_tc);94 fd_log_debug(" Tw Timer ............... : %u \n", fd_g_config->cnf_timer_tw);95 fd_log_debug(" Local port ............. : %hu \n", fd_g_config->cnf_port);96 fd_log_debug(" Local secure port ...... : %hu \n", fd_g_config->cnf_port_tls);97 fd_log_debug(" Number of SCTP streams . : %hu \n", fd_g_config->cnf_sctp_str);98 fd_log_debug(" Number of server threads : %hu \n", fd_g_config->cnf_dispthr);88 fd_log_debug("-- Configuration :"); 89 fd_log_debug(" Debug trace level ...... : %+d", fd_g_debug_lvl); 90 fd_log_debug(" Configuration file ..... : %s", fd_g_config->cnf_file); 91 fd_log_debug(" Diameter Identity ...... : %s (l:%Zi)", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len); 92 fd_log_debug(" Diameter Realm ......... : %s (l:%Zi)", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len); 93 fd_log_debug(" Tc Timer ............... : %u", fd_g_config->cnf_timer_tc); 94 fd_log_debug(" Tw Timer ............... : %u", fd_g_config->cnf_timer_tw); 95 fd_log_debug(" Local port ............. : %hu", fd_g_config->cnf_port); 96 fd_log_debug(" Local secure port ...... : %hu", fd_g_config->cnf_port_tls); 97 fd_log_debug(" Number of SCTP streams . : %hu", fd_g_config->cnf_sctp_str); 98 fd_log_debug(" Number of server threads : %hu", fd_g_config->cnf_dispthr); 99 99 if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) { 100 fd_log_debug(" Local endpoints ........ : Default (use all available) \n");100 fd_log_debug(" Local endpoints ........ : Default (use all available)"); 101 101 } else { 102 fd_log_debug(" Local endpoints ........ : \n");102 fd_log_debug(" Local endpoints ........ : "); 103 103 fd_ep_dump( 29, &fd_g_config->cnf_endpoints ); 104 104 } 105 105 if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_apps)) { 106 fd_log_debug(" Local applications ..... : (none) \n");106 fd_log_debug(" Local applications ..... : (none)"); 107 107 } else { 108 108 struct fd_list * li = fd_g_config->cnf_apps.next; … … 111 111 struct fd_app * app = (struct fd_app *)li; 112 112 if (li != fd_g_config->cnf_apps.next) fd_log_debug(" "); 113 fd_log_debug("App: %u\t%s%s\tVnd: %u \n",113 fd_log_debug("App: %u\t%s%s\tVnd: %u", 114 114 app->appid, 115 115 app->flags.auth ? "Au" : "--", … … 120 120 } 121 121 122 fd_log_debug(" Flags : - IP ........... : %s \n", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled");123 fd_log_debug(" - IPv6 ......... : %s \n", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled");124 fd_log_debug(" - Relay app .... : %s \n", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled");125 fd_log_debug(" - TCP .......... : %s \n", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled");122 fd_log_debug(" Flags : - IP ........... : %s", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled"); 123 fd_log_debug(" - IPv6 ......... : %s", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled"); 124 fd_log_debug(" - Relay app .... : %s", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled"); 125 fd_log_debug(" - TCP .......... : %s", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled"); 126 126 #ifdef DISABLE_SCTP 127 fd_log_debug(" - SCTP ......... : DISABLED (at compilation) \n");127 fd_log_debug(" - SCTP ......... : DISABLED (at compilation)"); 128 128 #else /* DISABLE_SCTP */ 129 fd_log_debug(" - SCTP ......... : %s \n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled");129 fd_log_debug(" - SCTP ......... : %s", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled"); 130 130 #endif /* DISABLE_SCTP */ 131 fd_log_debug(" - Pref. proto .. : %s \n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP");132 fd_log_debug(" - TLS method ... : %s \n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port");133 134 fd_log_debug(" TLS : - Certificate .. : %s \n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)");135 fd_log_debug(" - Private key .. : %s \n", fd_g_config->cnf_sec_data.key_file ?: "(NONE)");136 fd_log_debug(" - CA (trust) ... : %s (%d certs) \n", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr);137 fd_log_debug(" - CRL .......... : %s \n", fd_g_config->cnf_sec_data.crl_file ?: "(none)");138 fd_log_debug(" - Priority ..... : %s \n", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')");131 fd_log_debug(" - Pref. proto .. : %s", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"); 132 fd_log_debug(" - TLS method ... : %s", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"); 133 134 fd_log_debug(" TLS : - Certificate .. : %s", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)"); 135 fd_log_debug(" - Private key .. : %s", fd_g_config->cnf_sec_data.key_file ?: "(NONE)"); 136 fd_log_debug(" - CA (trust) ... : %s (%d certs)", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr); 137 fd_log_debug(" - CRL .......... : %s", fd_g_config->cnf_sec_data.crl_file ?: "(none)"); 138 fd_log_debug(" - Priority ..... : %s", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')"); 139 139 if (fd_g_config->cnf_sec_data.dh_file) 140 fd_log_debug(" - DH file ...... : %s \n", fd_g_config->cnf_sec_data.dh_file);140 fd_log_debug(" - DH file ...... : %s", fd_g_config->cnf_sec_data.dh_file); 141 141 else 142 fd_log_debug(" - DH bits ...... : %d \n", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS);143 144 fd_log_debug(" Origin-State-Id ........ : %u \n", fd_g_config->cnf_orstateid);142 fd_log_debug(" - DH bits ...... : %d", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS); 143 144 fd_log_debug(" Origin-State-Id ........ : %u", fd_g_config->cnf_orstateid); 145 145 } 146 146 … … 172 172 if (ferror(pemfile)) { 173 173 int err = errno; 174 TRACE_DEBUG(INFO, "An error occurred while reading file: %s \n", strerror(err));174 TRACE_DEBUG(INFO, "An error occurred while reading file: %s", strerror(err)); 175 175 return err; 176 176 } … … 201 201 gnutls_x509_crt_get_dn (cert, name, &name_size); 202 202 203 fd_log_debug("\tSubject: %s \n", name);204 fd_log_debug("\tIssuer: %s \n", issuer_name);203 fd_log_debug("\tSubject: %s", name); 204 fd_log_debug("\tIssuer: %s", issuer_name); 205 205 206 206 if (issuer != NULL) … … 209 209 gnutls_x509_crt_get_dn (issuer, issuer_name, &issuer_name_size); 210 210 211 fd_log_debug("\tVerified against: %s \n", issuer_name);211 fd_log_debug("\tVerified against: %s", issuer_name); 212 212 } 213 213 … … 217 217 gnutls_x509_crl_get_issuer_dn (crl, issuer_name, &issuer_name_size); 218 218 219 fd_log_debug("\tVerified against CRL of: %s \n", issuer_name);219 fd_log_debug("\tVerified against CRL of: %s", issuer_name); 220 220 } 221 221 222 fd_log_debug("\tVerification output: %x \n\n", verification_output);222 fd_log_debug("\tVerification output: %x", verification_output); 223 223 224 224 return 0; … … 248 248 if (fddin == NULL) { 249 249 int ret = errno; 250 TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s \n",250 TRACE_ERROR("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s", 251 251 orig ?: "", orig? " and " : "", fd_g_config->cnf_file, strerror(ret)); 252 252 return ret; … … 349 349 char buf[1024]; 350 350 sSA_DUMP_NODE( buf, sizeof(buf), &ep->sa, NI_NUMERICHOST ); 351 fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s \n", buf);351 fd_log_debug("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", buf); 352 352 } 353 353 free(ep); … … 380 380 if (!stream) { 381 381 int err = errno; 382 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s \n", fd_g_config->cnf_sec_data.cert_file, strerror(err));382 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.cert_file, strerror(err)); 383 383 return err; 384 384 } … … 441 441 if (output & GNUTLS_CERT_INVALID) 442 442 { 443 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);443 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 444 444 if (output & GNUTLS_CERT_SIGNER_NOT_FOUND) 445 fd_log_debug(" - The certificate hasn't got a known issuer. \n");445 fd_log_debug(" - The certificate hasn't got a known issuer."); 446 446 if (output & GNUTLS_CERT_SIGNER_NOT_CA) 447 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints. \n");447 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); 448 448 if (output & GNUTLS_CERT_NOT_ACTIVATED) 449 fd_log_debug(" - The certificate is not yet activated. \n");449 fd_log_debug(" - The certificate is not yet activated."); 450 450 if (output & GNUTLS_CERT_EXPIRED) 451 fd_log_debug(" - The certificate is expired. \n");451 fd_log_debug(" - The certificate is expired."); 452 452 return EINVAL; 453 453 } … … 456 456 if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) 457 457 { 458 fd_log_debug("TLS: The certificate owner does not match the hostname '%s' \n", fd_g_config->cnf_diamid);458 fd_log_debug("TLS: The certificate owner does not match the hostname '%s'", fd_g_config->cnf_diamid); 459 459 return EINVAL; 460 460 } … … 484 484 485 485 if (verify) { 486 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);486 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 487 487 if (verify & GNUTLS_CERT_INVALID) 488 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?) \n");488 fd_log_debug(" - The certificate is not trusted (unknown CA? expired?)"); 489 489 if (verify & GNUTLS_CERT_REVOKED) 490 fd_log_debug(" - The certificate has been revoked. \n");490 fd_log_debug(" - The certificate has been revoked."); 491 491 if (verify & GNUTLS_CERT_SIGNER_NOT_FOUND) 492 fd_log_debug(" - The certificate hasn't got a known issuer. \n");492 fd_log_debug(" - The certificate hasn't got a known issuer."); 493 493 if (verify & GNUTLS_CERT_SIGNER_NOT_CA) 494 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints. \n");494 fd_log_debug(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); 495 495 if (verify & GNUTLS_CERT_INSECURE_ALGORITHM) 496 fd_log_debug(" - The certificate signature uses a weak algorithm. \n");496 fd_log_debug(" - The certificate signature uses a weak algorithm."); 497 497 return EINVAL; 498 498 } … … 500 500 /* Check the local Identity is valid with the certificate */ 501 501 if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) { 502 fd_log_debug("TLS: Local certificate '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);503 fd_log_debug(" - The certificate hostname does not match '%s' \n", fd_g_config->cnf_diamid);502 fd_log_debug("TLS: Local certificate '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 503 fd_log_debug(" - The certificate hostname does not match '%s'", fd_g_config->cnf_diamid); 504 504 return EINVAL; 505 505 } … … 513 513 GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(certs[i]) ); 514 514 if ((deadline != (time_t)-1) && (deadline < now)) { 515 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);516 fd_log_debug(" - The certificate %d in the chain is expired \n", i);515 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 516 fd_log_debug(" - The certificate %d in the chain is expired", i); 517 517 return EINVAL; 518 518 } … … 520 520 GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(certs[i]) ); 521 521 if ((deadline != (time_t)-1) && (deadline > now)) { 522 fd_log_debug("TLS: Local certificate chain '%s' is invalid : \n", fd_g_config->cnf_sec_data.cert_file);523 fd_log_debug(" - The certificate %d in the chain is not yet activated \n", i);522 fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); 523 fd_log_debug(" - The certificate %d in the chain is not yet activated", i); 524 524 return EINVAL; 525 525 } … … 551 551 if (!stream) { 552 552 int err = errno; 553 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s \n", fd_g_config->cnf_sec_data.dh_file, strerror(err));553 TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err)); 554 554 return err; 555 555 } … … 573 573 if (ferror(stream)) { 574 574 int err = errno; 575 TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s \n", fd_g_config->cnf_sec_data.dh_file, strerror(err));575 TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err)); 576 576 return err; 577 577 } -
libfdcore/core.c
r961 r974 131 131 132 132 default: 133 TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored. \n", code);133 TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.", code); 134 134 } 135 135 } … … 154 154 CHECK_FCT_DO( fd_event_trig_fini(), ); 155 155 156 fd_log_debug(FD_PROJECT_BINARY " framework is terminated. \n");156 fd_log_debug(FD_PROJECT_BINARY " framework is terminated."); 157 157 158 158 fd_libproto_fini(); -
libfdcore/endpoints.c
r946 r974 64 64 fd_ep_dump( 4, list ); 65 65 TRACE_DEBUG(ANNOYING, " DEBUG:fd_ep_add_merge Adding:"); 66 fd_log_debug(" %s {%s%s%s%s} \n", buf,66 fd_log_debug(" %s {%s%s%s%s}", buf, 67 67 (flags & EP_FL_CONF) ? "C" : "-", 68 68 (flags & EP_FL_DISC) ? "D" : "-", -
libfdcore/events.c
r740 r974 178 178 for (li = trig_list.next; li != &trig_list; li = li->next) { 179 179 struct trig_item *t = li->o; 180 fd_log_debug(" Trigger %d, module '%s': %p \n", t->trig_value, t->trig_module, t->cb);180 fd_log_debug(" Trigger %d, module '%s': %p", t->trig_value, t->trig_module, t->cb); 181 181 } 182 182 -
libfdcore/extensions.c
r837 r974 82 82 struct fd_list * li; 83 83 84 fd_log_debug("Dumping extensions list : \n");84 fd_log_debug("Dumping extensions list :"); 85 85 86 86 for (li = ext_list.next; li != &ext_list; li = li->next) 87 87 { 88 88 struct fd_ext_info * ext = (struct fd_ext_info *)li; 89 fd_log_debug(" - '%s'[%s] is %sloaded \n", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not ");89 fd_log_debug(" - '%s'[%s] is %sloaded", ext->filename, ext->conffile?:"no conf", ext->handler ? "" : "not "); 90 90 } 91 91 } … … 126 126 if (li == &ext->chain) { 127 127 /* the dependency was not found */ 128 TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first. \nPlease fix your configuration file.",128 TRACE_DEBUG(NONE, "Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.", 129 129 ext->ext_name, ext->depends[i]); 130 130 return ESRCH; … … 162 162 if (ext->handler == NULL) { 163 163 /* An error occured */ 164 TRACE_DEBUG( NONE, "Loading of extension %s failed: \n%s", ext->filename, dlerror());164 TRACE_DEBUG( NONE, "Loading of extension %s failed: %s", ext->filename, dlerror()); 165 165 #ifdef DEBUG 166 166 ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL); 167 167 if (ext->handler) { 168 168 if (!check_dependencies(ext)) { 169 TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!) \n");169 TRACE_DEBUG( NONE, "In addition, all declared dependencies are satisfied (Internal Error!)"); 170 170 } 171 171 } … … 182 182 if (fd_ext_init == NULL) { 183 183 /* An error occured */ 184 TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s: \n %s\n", ext->filename, dlerror());184 TRACE_DEBUG( NONE, "Unable to resolve symbol 'fd_ext_init' for extension %s: %s", ext->filename, dlerror()); 185 185 return EINVAL; 186 186 } … … 201 201 if (ret != 0) { 202 202 /* The extension was unable to load cleanly */ 203 TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s \n", ext->filename, strerror(ret));203 TRACE_DEBUG( NONE, "Extension %s returned an error during initialization: %s", ext->filename, strerror(ret)); 204 204 return ret; 205 205 } … … 239 239 TRACE_DEBUG (FULL, "Unloading %s", ext->ext_name ?: ext->filename); 240 240 if ( dlclose(ext->handler) != 0 ) { 241 TRACE_DEBUG (INFO, "Unloading [%s] failed : %s \n", ext->ext_name ?: ext->filename, dlerror());241 TRACE_DEBUG (INFO, "Unloading [%s] failed : %s", ext->ext_name ?: ext->filename, dlerror()); 242 242 } 243 243 } -
libfdcore/fdd.l
r969 r974 84 84 int globerrfct(const char *epath, int eerrno) 85 85 { 86 TRACE_ERROR("Failed to scan %s: %s \n", epath, strerror(eerrno));86 TRACE_ERROR("Failed to scan %s: %s", epath, strerror(eerrno)); 87 87 return 1; 88 88 } … … 119 119 if (buf[yyleng-2] != '"') 120 120 { 121 TRACE_ERROR("Unterminated string: %s \n", yytext);121 TRACE_ERROR("Unterminated string: %s", yytext); 122 122 return LEX_ERROR; 123 123 } … … 126 126 if (current_nested_level >= MAX_NESTED_CONF_FILES) 127 127 { 128 TRACE_ERROR("Too many recursion levels in configuration files includes \n");128 TRACE_ERROR("Too many recursion levels in configuration files includes"); 129 129 return LEX_ERROR; 130 130 } … … 135 135 if (globerror == GLOB_NOSPACE) 136 136 { 137 TRACE_ERROR("Not enough memory to parse include directive. \n");137 TRACE_ERROR("Not enough memory to parse include directive."); 138 138 return LEX_ERROR; 139 139 } 140 140 if (globerror == GLOB_ABORTED) 141 141 { 142 TRACE_ERROR("An error was encountered in include directive. \n");142 TRACE_ERROR("An error was encountered in include directive."); 143 143 return LEX_ERROR; 144 144 } … … 150 150 if (globerror) 151 151 { 152 TRACE_ERROR("Unexpected error in glob (%d). \n", globerror);152 TRACE_ERROR("Unexpected error in glob (%d).", globerror); 153 153 return LEX_ERROR; 154 154 } … … 234 234 if (ret != 1) { 235 235 /* No matching: an error occurred */ 236 TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s \n", yytext, strerror(errno));236 TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); 237 237 return LEX_ERROR; /* trig an error in yacc parser */ 238 238 /* Maybe we could REJECT instead of failing here? */ … … 277 277 /* Unrecognized character */ 278 278 <*>. { 279 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'. \n", yylloc->first_line, yylloc->first_column, yytext);279 TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); 280 280 return LEX_ERROR; 281 281 } -
libfdcore/fdd.y
r969 r974 63 63 { 64 64 if (ploc->first_line != ploc->last_line) { 65 TRACE_ERROR("%s:%d.%d-%d.%d : %s \n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);65 TRACE_ERROR("%s:%d.%d-%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); 66 66 } else if (ploc->first_column != ploc->last_column) { 67 TRACE_ERROR("%s:%d.%d-%d : %s \n", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s);67 TRACE_ERROR("%s:%d.%d-%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); 68 68 } else { 69 TRACE_ERROR("%s:%d.%d : %s \n", conf->cnf_file, ploc->first_line, ploc->first_column, s);69 TRACE_ERROR("%s:%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, s); 70 70 } 71 71 } … … 504 504 if (fd == NULL) { 505 505 int ret = errno; 506 TRACE_ERROR("Unable to open certificate file %s for reading: %s \n", $3, strerror(ret));506 TRACE_ERROR("Unable to open certificate file %s for reading: %s", $3, strerror(ret)); 507 507 yyerror (&yylloc, conf, "Error on file name"); 508 508 YYERROR; … … 512 512 if (fd == NULL) { 513 513 int ret = errno; 514 TRACE_ERROR("Unable to open private key file %s for reading: %s \n", $5, strerror(ret));514 TRACE_ERROR("Unable to open private key file %s for reading: %s", $5, strerror(ret)); 515 515 yyerror (&yylloc, conf, "Error on file name"); 516 516 YYERROR; … … 535 535 if (fd == NULL) { 536 536 int ret = errno; 537 TRACE_ERROR("Unable to open CA file %s for reading: %s \n", $3, strerror(ret));537 TRACE_ERROR("Unable to open CA file %s for reading: %s", $3, strerror(ret)); 538 538 yyerror (&yylloc, conf, "Error on file name"); 539 539 YYERROR; … … 575 575 if (fd == NULL) { 576 576 int ret = errno; 577 TRACE_ERROR("Unable to open CRL file %s for reading: %s \n", $3, strerror(ret));577 TRACE_ERROR("Unable to open CRL file %s for reading: %s", $3, strerror(ret)); 578 578 yyerror (&yylloc, conf, "Error on file name"); 579 579 YYERROR; … … 618 618 &err_pos), 619 619 { yyerror (&yylloc, conf, "Error setting Priority parameter."); 620 TRACE_ERROR("Error at position : %s \n", err_pos);620 TRACE_ERROR("Error at position : %s", err_pos); 621 621 YYERROR; } ); 622 622 } … … 635 635 if (fd == NULL) { 636 636 int ret = errno; 637 TRACE_ERROR("Unable to open DH file %s for reading: %s \n", $3, strerror(ret));637 TRACE_ERROR("Unable to open DH file %s for reading: %s", $3, strerror(ret)); 638 638 yyerror (&yylloc, conf, "Error on file name"); 639 639 YYERROR; -
libfdcore/p_ce.c
r935 r974 306 306 if (fd_os_almostcasesrch(hdr->avp_value->os.data, hdr->avp_value->os.len, 307 307 peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, NULL)) { 308 TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s' \n",308 TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'", 309 309 hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid); 310 310 error->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED"; … … 778 778 { 779 779 /* Handshake failed ... */ 780 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection \n", peer->p_hdr.info.pi_diamid);780 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid); 781 781 goto cleanup; 782 782 } ); … … 831 831 size_t len = strlen(peer->p_hdr.info.config.pic_realm); 832 832 if (fd_os_almostcasesrch(peer->p_hdr.info.config.pic_realm, len, peer->p_hdr.info.runtime.pir_realm, peer->p_hdr.info.runtime.pir_realmlen, NULL)) { 833 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER). \n", peer->p_hdr.info.pi_diamid);833 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid); 834 834 pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; /* maybe AVP_NOT_ALLOWED would be better fit? */ 835 835 goto error_abort; … … 846 846 int res = fd_peer_validate( peer ); 847 847 if (res < 0) { 848 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER). \n", peer->p_hdr.info.pi_diamid);848 TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid); 849 849 pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; 850 850 goto error_abort; … … 931 931 { 932 932 /* Handshake failed ... */ 933 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection \n", peer->p_hdr.info.pi_diamid);933 fd_log_debug("TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid); 934 934 goto cleanup; 935 935 } ); -
libfdcore/p_cnx.c
r931 r974 90 90 ret = getaddrinfo(peer->p_hdr.info.pi_diamid, NULL, &hints, &ai); 91 91 if (ret) { 92 TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting \n", peer->p_hdr.info.pi_diamid, gai_strerror(ret));92 TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting", peer->p_hdr.info.pi_diamid, gai_strerror(ret)); 93 93 if (ret != EAI_AGAIN) 94 94 fd_psm_terminate( peer, NULL ); … … 126 126 /* Now check we have at least one address to attempt */ 127 127 if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) { 128 TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting \n",128 TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting", 129 129 peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid); 130 130 fd_psm_terminate( peer, NULL ); … … 279 279 { 280 280 /* Handshake failed ... */ 281 TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection \n", peer->p_hdr.info.pi_diamid);281 TRACE_DEBUG(INFO, "TLS Handshake failed with peer '%s', resetting the connection", peer->p_hdr.info.pi_diamid); 282 282 fd_cnx_destroy(cnx); 283 283 empty_connection_list(peer); -
libfdcore/p_dp.c
r740 r974 97 97 if (dictobj) { 98 98 CHECK_FCT( fd_dict_getval( dictobj, &er.search ) ); 99 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s \n", peer->p_hdr.info.pi_diamid, er.search.enum_name);99 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s", peer->p_hdr.info.pi_diamid, er.search.enum_name); 100 100 } else { 101 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u \n", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC);101 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC); 102 102 } 103 103 } else { 104 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP \n", peer->p_hdr.info.pi_diamid);104 TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP", peer->p_hdr.info.pi_diamid); 105 105 } 106 106 } -
libfdcore/p_dw.c
r745 r974 62 62 63 63 if (peer->p_hdr.info.runtime.pir_orstate != hdr->avp_value->u32) { 64 TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection. \n",64 TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.", 65 65 peer->p_hdr.info.pi_diamid, 66 66 peer->p_hdr.info.runtime.pir_orstate, -
libfdcore/p_psm.c
r972 r974 486 486 CHECK_FCT_DO( fd_msg_parse_buffer( (void *)&ev_data, ev_sz, &msg), 487 487 { 488 fd_log_debug("Received invalid data from peer '%s', closing the connection \n", peer->p_hdr.info.pi_diamid);488 fd_log_debug("Received invalid data from peer '%s', closing the connection", peer->p_hdr.info.pi_diamid); 489 489 free(ev_data); 490 490 CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset ); -
libfdcore/p_sr.c
r938 r974 69 69 return; 70 70 71 fd_log_debug("%sSentReq list @%p: \n", text, srlist);71 fd_log_debug("%sSentReq list @%p:", text, srlist); 72 72 73 73 CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); … … 77 77 uint32_t * nexthbh = li->o; 78 78 79 fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec] \n", *nexthbh,79 fd_log_debug(" - Next req (hbh:%x): [since %ld.%06ld sec]", *nexthbh, 80 80 (now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_sec - sr->added_on.tv_sec) : (now.tv_sec - sr->added_on.tv_sec - 1), 81 81 (now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_nsec - sr->added_on.tv_nsec) / 1000 : (now.tv_nsec - sr->added_on.tv_nsec + 1000000000) / 1000); -
libfdcore/peers.c
r972 r974 405 405 void fd_peer_dump(struct fd_peer * peer, int details) 406 406 { 407 char buf[1024]; 407 408 if (peer->p_eyec != EYEC_PEER) { 408 fd_log_debug(" Invalid peer @ %p ! \n", peer);409 fd_log_debug(" Invalid peer @ %p !", peer); 409 410 return; 410 411 } 411 412 412 fd_log_debug("> %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt);413 snprintf(buf, sizeof(buf), "> %s\t%s\t[%dsr]", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid, peer->p_sr.cnt); 413 414 if (details > INFO) { 414 fd_log_debug("\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>");415 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t(rlm:%s)", peer->p_hdr.info.runtime.pir_realm ?: "<unknown>"); 415 416 if (peer->p_hdr.info.runtime.pir_prodname) 416 fd_log_debug("\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev);417 } 418 fd_log_debug( "\n");417 snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "\t['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev); 418 } 419 fd_log_debug(buf); 419 420 if (details > FULL) { 420 421 /* Dump all info */ 421 fd_log_debug("\tEntry origin : %s \n", peer->p_dbgorig?: "not set");422 fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s \n",422 fd_log_debug("\tEntry origin : %s", peer->p_dbgorig?: "not set"); 423 fd_log_debug("\tConfig flags : %s%s%s%s%s - %s%s%s", 423 424 peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_DEFAULT ? "" : 424 425 (peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP ? "IP." : "IPv6."), … … 431 432 peer->p_hdr.info.config.pic_flags.persist ? "Persist." : "" 432 433 ); 433 fd_log_debug("\tLifetime : %d sec \n", peer->p_hdr.info.config.pic_lft);434 fd_log_debug("\tLifetime : %d sec", peer->p_hdr.info.config.pic_lft); 434 435 } 435 436 } … … 440 441 struct fd_list * li; 441 442 442 fd_log_debug("Dumping list of peers : \n");443 fd_log_debug("Dumping list of peers :"); 443 444 CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ ); 444 445 -
libfdcore/routing_dispatch.c
r934 r974 565 565 /* Check if we have local support for the message application */ 566 566 if ( (hdr->msg_appl == 0) || (hdr->msg_appl == AI_RELAY) ) { 567 TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay), \n"567 TRACE_DEBUG(INFO, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay)," 568 568 " returning DIAMETER_APPLICATION_UNSUPPORTED"); 569 569 CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", "Routable message with application id 0 or relay", NULL) ); -
libfdcore/sctp.c
r965 r974 88 88 return ENOTSUP; 89 89 } 90 fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u \n", rtoinfo.srto_initial);91 fd_log_debug( " srto_min : %u \n", rtoinfo.srto_min);92 fd_log_debug( " srto_max : %u \n", rtoinfo.srto_max);90 fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); 91 fd_log_debug( " srto_min : %u", rtoinfo.srto_min); 92 fd_log_debug( " srto_max : %u", rtoinfo.srto_max); 93 93 } 94 94 … … 103 103 /* Check new values */ 104 104 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz) ); 105 fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u \n", rtoinfo.srto_initial);106 fd_log_debug( " srto_max : %u \n", rtoinfo.srto_max);107 fd_log_debug( " srto_min : %u \n", rtoinfo.srto_min);105 fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); 106 fd_log_debug( " srto_max : %u", rtoinfo.srto_max); 107 fd_log_debug( " srto_min : %u", rtoinfo.srto_min); 108 108 } 109 109 } … … 127 127 return ENOTSUP; 128 128 } 129 fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu \n", assoc.sasoc_asocmaxrxt);130 fd_log_debug( " sasoc_number_peer_destinations : %hu \n", assoc.sasoc_number_peer_destinations);131 fd_log_debug( " sasoc_peer_rwnd : %u \n" , assoc.sasoc_peer_rwnd);132 fd_log_debug( " sasoc_local_rwnd : %u \n" , assoc.sasoc_local_rwnd);133 fd_log_debug( " sasoc_cookie_life : %u \n" , assoc.sasoc_cookie_life);129 fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); 130 fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); 131 fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); 132 fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); 133 fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); 134 134 } 135 135 … … 143 143 /* Check new values */ 144 144 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz) ); 145 fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu \n", assoc.sasoc_asocmaxrxt);146 fd_log_debug( " sasoc_number_peer_destinations : %hu \n", assoc.sasoc_number_peer_destinations);147 fd_log_debug( " sasoc_peer_rwnd : %u \n" , assoc.sasoc_peer_rwnd);148 fd_log_debug( " sasoc_local_rwnd : %u \n" , assoc.sasoc_local_rwnd);149 fd_log_debug( " sasoc_cookie_life : %u \n" , assoc.sasoc_cookie_life);145 fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); 146 fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); 147 fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); 148 fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); 149 fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); 150 150 } 151 151 } … … 171 171 return ENOTSUP; 172 172 } 173 fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu \n", init.sinit_num_ostreams);174 fd_log_debug( " sinit_max_instreams : %hu \n", init.sinit_max_instreams);175 fd_log_debug( " sinit_max_attempts : %hu \n", init.sinit_max_attempts);176 fd_log_debug( " sinit_max_init_timeo : %hu \n", init.sinit_max_init_timeo);173 fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); 174 fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); 175 fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); 176 fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); 177 177 } 178 178 … … 187 187 /* Check new values */ 188 188 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz) ); 189 fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu \n", init.sinit_num_ostreams);190 fd_log_debug( " sinit_max_instreams : %hu \n", init.sinit_max_instreams);191 fd_log_debug( " sinit_max_attempts : %hu \n", init.sinit_max_attempts);192 fd_log_debug( " sinit_max_init_timeo : %hu \n", init.sinit_max_init_timeo);189 fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); 190 fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); 191 fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); 192 fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); 193 193 } 194 194 } … … 212 212 return ENOTSUP; 213 213 } 214 fd_log_debug( "Def SO_LINGER : l_onoff : %d \n", linger.l_onoff);215 fd_log_debug( " l_linger : %d \n", linger.l_linger);214 fd_log_debug( "Def SO_LINGER : l_onoff : %d", linger.l_onoff); 215 fd_log_debug( " l_linger : %d", linger.l_linger); 216 216 } 217 217 … … 225 225 /* Check new values */ 226 226 CHECK_SYS( getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz) ); 227 fd_log_debug( "New SO_LINGER : l_onoff : %d \n", linger.l_onoff);228 fd_log_debug( " l_linger : %d \n", linger.l_linger);227 fd_log_debug( "New SO_LINGER : l_onoff : %d", linger.l_onoff); 228 fd_log_debug( " l_linger : %d", linger.l_linger); 229 229 } 230 230 } … … 247 247 return ENOTSUP; 248 248 } 249 fd_log_debug( "Def SCTP_NODELAY value : %s \n", nodelay ? "true" : "false");249 fd_log_debug( "Def SCTP_NODELAY value : %s", nodelay ? "true" : "false"); 250 250 } 251 251 … … 258 258 /* Check new values */ 259 259 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz) ); 260 fd_log_debug( "New SCTP_NODELAY value : %s \n", nodelay ? "true" : "false");260 fd_log_debug( "New SCTP_NODELAY value : %s", nodelay ? "true" : "false"); 261 261 } 262 262 } … … 287 287 return ENOTSUP; 288 288 } 289 fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s \n", nofrag ? "true" : "false");289 fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); 290 290 } 291 291 … … 298 298 /* Check new values */ 299 299 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz) ); 300 fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s \n", nofrag ? "true" : "false");300 fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); 301 301 } 302 302 } … … 324 324 return ENOTSUP; 325 325 } 326 fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u \n", parms.spp_hbinterval);327 fd_log_debug( " spp_pathmaxrxt : %hu \n", parms.spp_pathmaxrxt);328 fd_log_debug( " spp_pathmtu : %u \n", parms.spp_pathmtu);329 fd_log_debug( " spp_flags : %x \n", parms.spp_flags);330 // fd_log_debug( " spp_ipv6_flowlabel: %u \n", parms.spp_ipv6_flowlabel);331 // fd_log_debug( " spp_ipv4_tos : %hhu \n",parms.spp_ipv4_tos);326 fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); 327 fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); 328 fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); 329 fd_log_debug( " spp_flags : %x", parms.spp_flags); 330 // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); 331 // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); 332 332 } 333 333 … … 348 348 /* Check new values */ 349 349 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz) ); 350 fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u \n", parms.spp_hbinterval);351 fd_log_debug( " spp_pathmaxrxt : %hu \n", parms.spp_pathmaxrxt);352 fd_log_debug( " spp_pathmtu : %u \n", parms.spp_pathmtu);353 fd_log_debug( " spp_flags : %x \n", parms.spp_flags);354 // fd_log_debug( " spp_ipv6_flowlabel: %u \n", parms.spp_ipv6_flowlabel);355 // fd_log_debug( " spp_ipv4_tos : %hhu \n",parms.spp_ipv4_tos);350 fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); 351 fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); 352 fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); 353 fd_log_debug( " spp_flags : %x", parms.spp_flags); 354 // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); 355 // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); 356 356 } 357 357 } … … 392 392 } 393 393 394 fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu \n", event.sctp_data_io_event);395 fd_log_debug( " sctp_association_event : %hhu \n", event.sctp_association_event);396 fd_log_debug( " sctp_address_event : %hhu \n", event.sctp_address_event);397 fd_log_debug( " sctp_send_failure_event : %hhu \n", event.sctp_send_failure_event);398 fd_log_debug( " sctp_peer_error_event : %hhu \n", event.sctp_peer_error_event);399 fd_log_debug( " sctp_shutdown_event : %hhu \n", event.sctp_shutdown_event);400 fd_log_debug( " sctp_partial_delivery_event : %hhu \n", event.sctp_partial_delivery_event);401 fd_log_debug( " sctp_adaptation_layer_event : %hhu \n", event.sctp_adaptation_layer_event);402 // fd_log_debug( " sctp_authentication_event : %hhu \n", event.sctp_authentication_event);394 fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu", event.sctp_data_io_event); 395 fd_log_debug( " sctp_association_event : %hhu", event.sctp_association_event); 396 fd_log_debug( " sctp_address_event : %hhu", event.sctp_address_event); 397 fd_log_debug( " sctp_send_failure_event : %hhu", event.sctp_send_failure_event); 398 fd_log_debug( " sctp_peer_error_event : %hhu", event.sctp_peer_error_event); 399 fd_log_debug( " sctp_shutdown_event : %hhu", event.sctp_shutdown_event); 400 fd_log_debug( " sctp_partial_delivery_event : %hhu", event.sctp_partial_delivery_event); 401 fd_log_debug( " sctp_adaptation_layer_event : %hhu", event.sctp_adaptation_layer_event); 402 // fd_log_debug( " sctp_authentication_event : %hhu", event.sctp_authentication_event); 403 403 } 404 404 } … … 421 421 return ENOTSUP; 422 422 } 423 fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s \n", v4mapped ? "true" : "false");423 fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); 424 424 } 425 425 … … 436 436 /* Check new values */ 437 437 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) ); 438 fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s \n", v4mapped ? "true" : "false");438 fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); 439 439 } 440 440 } else { … … 467 467 return ENOTSUP; 468 468 } 469 fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d \n", interleave);469 fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); 470 470 } 471 471 … … 482 482 /* Check new values */ 483 483 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz) ); 484 fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d \n", interleave);484 fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); 485 485 } 486 486 } … … 513 513 return ENOTSUP; 514 514 } 515 fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s \n", bool ? "true" : "false");515 fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); 516 516 } 517 517 … … 524 524 /* Check new values */ 525 525 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); 526 fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s \n", bool ? "true" : "false");526 fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); 527 527 } 528 528 } … … 571 571 return ENOTSUP; 572 572 } 573 fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s \n", asconf ? "true" : "false");573 fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); 574 574 } 575 575 … … 583 583 /* Check new values */ 584 584 CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz) ); 585 fd_log_debug( "New SCTP_AUTO_ASCONF value : %s \n", asconf ? "true" : "false");585 fd_log_debug( "New SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); 586 586 } 587 587 } … … 746 746 int i; 747 747 ptr.sa = sar; 748 fd_log_debug("Calling sctp_bindx with the following address array: \n");748 fd_log_debug("Calling sctp_bindx with the following address array:"); 749 749 for (i = 0; i < count; i++) { 750 750 TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); … … 774 774 CHECK_SYS( sz = sctp_getladdrs(*sock, 0, &sar) ); 775 775 776 fd_log_debug("SCTP server bound on : \n");776 fd_log_debug("SCTP server bound on :"); 777 777 for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) { 778 778 TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); … … 911 911 char buf[1024]; 912 912 sSA_DUMP_NODE_SERV(buf, sizeof(buf), &status.sstat_primary.spinfo_address, NI_NUMERICHOST | NI_NUMERICSERV ); 913 fd_log_debug( "SCTP_STATUS : sstat_state : %i \n" , status.sstat_state);914 fd_log_debug( " sstat_rwnd : %u \n" , status.sstat_rwnd);915 fd_log_debug( " sstat_unackdata : %hu \n", status.sstat_unackdata);916 fd_log_debug( " sstat_penddata : %hu \n", status.sstat_penddata);917 fd_log_debug( " sstat_instrms : %hu \n", status.sstat_instrms);918 fd_log_debug( " sstat_outstrms : %hu \n", status.sstat_outstrms);919 fd_log_debug( " sstat_fragmentation_point : %u \n" , status.sstat_fragmentation_point);920 fd_log_debug( " sstat_primary.spinfo_address : %s \n" , buf);921 fd_log_debug( " sstat_primary.spinfo_state : %d \n" , status.sstat_primary.spinfo_state);922 fd_log_debug( " sstat_primary.spinfo_cwnd : %u \n" , status.sstat_primary.spinfo_cwnd);923 fd_log_debug( " sstat_primary.spinfo_srtt : %u \n" , status.sstat_primary.spinfo_srtt);924 fd_log_debug( " sstat_primary.spinfo_rto : %u \n" , status.sstat_primary.spinfo_rto);925 fd_log_debug( " sstat_primary.spinfo_mtu : %u \n" , status.sstat_primary.spinfo_mtu);913 fd_log_debug( "SCTP_STATUS : sstat_state : %i" , status.sstat_state); 914 fd_log_debug( " sstat_rwnd : %u" , status.sstat_rwnd); 915 fd_log_debug( " sstat_unackdata : %hu", status.sstat_unackdata); 916 fd_log_debug( " sstat_penddata : %hu", status.sstat_penddata); 917 fd_log_debug( " sstat_instrms : %hu", status.sstat_instrms); 918 fd_log_debug( " sstat_outstrms : %hu", status.sstat_outstrms); 919 fd_log_debug( " sstat_fragmentation_point : %u" , status.sstat_fragmentation_point); 920 fd_log_debug( " sstat_primary.spinfo_address : %s" , buf); 921 fd_log_debug( " sstat_primary.spinfo_state : %d" , status.sstat_primary.spinfo_state); 922 fd_log_debug( " sstat_primary.spinfo_cwnd : %u" , status.sstat_primary.spinfo_cwnd); 923 fd_log_debug( " sstat_primary.spinfo_srtt : %u" , status.sstat_primary.spinfo_srtt); 924 fd_log_debug( " sstat_primary.spinfo_rto : %u" , status.sstat_primary.spinfo_rto); 925 fd_log_debug( " sstat_primary.spinfo_mtu : %u" , status.sstat_primary.spinfo_mtu); 926 926 } 927 927 … … 1219 1219 sndrcv = (struct sctp_sndrcvinfo *) CMSG_DATA(hdr); 1220 1220 if (TRACE_BOOL(SCTP_LEVEL)) { 1221 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV \n");1222 fd_log_debug( " sinfo_stream : %hu \n", sndrcv->sinfo_stream);1223 fd_log_debug( " sinfo_ssn : %hu \n", sndrcv->sinfo_ssn);1224 fd_log_debug( " sinfo_flags : %hu \n", sndrcv->sinfo_flags);1225 /* fd_log_debug( " sinfo_pr_policy : %hu \n", sndrcv->sinfo_pr_policy); */1226 fd_log_debug( " sinfo_ppid : %u \n" , sndrcv->sinfo_ppid);1227 fd_log_debug( " sinfo_context : %u \n" , sndrcv->sinfo_context);1228 /* fd_log_debug( " sinfo_pr_value : %u \n" , sndrcv->sinfo_pr_value); */1229 fd_log_debug( " sinfo_tsn : %u \n" , sndrcv->sinfo_tsn);1230 fd_log_debug( " sinfo_cumtsn : %u \n" , sndrcv->sinfo_cumtsn);1221 fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV"); 1222 fd_log_debug( " sinfo_stream : %hu", sndrcv->sinfo_stream); 1223 fd_log_debug( " sinfo_ssn : %hu", sndrcv->sinfo_ssn); 1224 fd_log_debug( " sinfo_flags : %hu", sndrcv->sinfo_flags); 1225 /* fd_log_debug( " sinfo_pr_policy : %hu", sndrcv->sinfo_pr_policy); */ 1226 fd_log_debug( " sinfo_ppid : %u" , sndrcv->sinfo_ppid); 1227 fd_log_debug( " sinfo_context : %u" , sndrcv->sinfo_context); 1228 /* fd_log_debug( " sinfo_pr_value : %u" , sndrcv->sinfo_pr_value); */ 1229 fd_log_debug( " sinfo_tsn : %u" , sndrcv->sinfo_tsn); 1230 fd_log_debug( " sinfo_cumtsn : %u" , sndrcv->sinfo_cumtsn); 1231 1231 } 1232 1232 -
libfdcore/sctps.c
r965 r974 486 486 if (TRACE_BOOL(FULL)) { 487 487 if (resumed) { 488 fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s') \n", ctx->strid, fd_cnx_getid(ctx->parent));488 fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent)); 489 489 } else { 490 fd_log_debug("Session was NOT resumed on stream %hu (full handshake) (conn: '%s') \n", ctx->strid, fd_cnx_getid(ctx->parent));490 fd_log_debug("Session was NOT resumed on stream %hu (full handshake) (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent)); 491 491 } 492 492 } -
libfdcore/server.c
r931 r974 98 98 struct fd_list * li, *cli; 99 99 100 fd_log_debug("Dumping servers list : \n");100 fd_log_debug("Dumping servers list :"); 101 101 for (li = FD_SERVERS.next; li != &FD_SERVERS; li = li->next) { 102 102 struct server * s = (struct server *)li; 103 103 enum s_state st = get_status(s); 104 fd_log_debug(" Serv %p '%s': %s, %s, %s \n",104 fd_log_debug(" Serv %p '%s': %s, %s, %s", 105 105 s, fd_cnx_getid(s->conn), 106 106 IPPROTO_NAME( s->proto ), … … 115 115 struct client * c = (struct client *)cli; 116 116 char bufts[128]; 117 fd_log_debug(" Connected: '%s' (timeout: %s) \n",117 fd_log_debug(" Connected: '%s' (timeout: %s)", 118 118 fd_cnx_getid(c->conn), 119 119 fd_log_time(&c->ts, bufts, sizeof(bufts))); … … 148 148 if (ret != 0) { 149 149 if (TRACE_BOOL(INFO)) { 150 fd_log_debug("TLS handshake failed for client '%s', connection aborted. \n", fd_cnx_getid(c->conn));150 fd_log_debug("TLS handshake failed for client '%s', connection aborted.", fd_cnx_getid(c->conn)); 151 151 } 152 152 goto cleanup; … … 177 177 CHECK_FCT_DO( fd_msg_hdr ( msg, &hdr ), goto fatal_error ); 178 178 CHECK_PARAMS_DO( (hdr->msg_appl == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (hdr->msg_code == CC_CAPABILITIES_EXCHANGE), 179 { fd_log_debug("Connection '%s', expecting CER, received something else, closing... \n", fd_cnx_getid(c->conn)); goto cleanup; } );179 { fd_log_debug("Connection '%s', expecting CER, received something else, closing...", fd_cnx_getid(c->conn)); goto cleanup; } ); 180 180 181 181 /* Finally, pass the information to the peers module which will handle it next */ … … 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. \n"389 TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system." 390 390 "Please use \"ListenOn\" parameter in the configuration.\n" 391 391 "This information is required to generate the CER/CEA messages.\n"); … … 394 394 } 395 395 if (TRACE_BOOL(FULL)){ 396 fd_log_debug(" Local server address(es) : \n");396 fd_log_debug(" Local server address(es) :"); 397 397 fd_ep_dump( 5, &fd_g_config->cnf_endpoints ); 398 398 } -
libfdproto/dictionary.c
r972 r974 315 315 { 316 316 if (obj) { 317 TRACE_DEBUG(FULL, "Invalid object : %p \n"317 TRACE_DEBUG(FULL, "Invalid object : %p" 318 318 " obj->objeyec : %x / %x\n" 319 319 " obj->type : %d\n" … … 1282 1282 for (i=0; i<NB_LISTS_PER_OBJ; i++) { 1283 1283 if ((obj->list[i].o == NULL) && (obj->list[i].next != &obj->list[i])) { 1284 fd_log_debug("%*s>%p: list[%d]: \n", indent, "", obj, i);1284 fd_log_debug("%*s>%p: list[%d]:", indent, "", obj, i); 1285 1285 dump_list(&obj->list[i], parents, depth - 1, indent + 2); 1286 1286 } … … 1291 1291 void fd_dict_dump_object(struct dict_object * obj) 1292 1292 { 1293 fd_log_debug("Dictionary object %p dump: \n", obj);1293 fd_log_debug("Dictionary object %p dump:", obj); 1294 1294 dump_object( obj, 1, 2, 2 ); 1295 1295 } … … 1304 1304 CHECK_POSIX_DO( pthread_rwlock_rdlock( &dict->dict_lock ), /* ignore */ ); 1305 1305 1306 fd_log_debug("###################################################### \n");1307 fd_log_debug("###### Dumping vendors, AVPs and related rules ####### \n");1306 fd_log_debug("######################################################"); 1307 fd_log_debug("###### Dumping vendors, AVPs and related rules #######"); 1308 1308 1309 1309 dump_object( &dict->dict_vendors, 0, 3, 0 ); … … 1311 1311 dump_object( li->o, 0, 3, 0 ); 1312 1312 1313 fd_log_debug("###### Dumping applications ####### \n");1313 fd_log_debug("###### Dumping applications #######"); 1314 1314 1315 1315 dump_object( &dict->dict_applications, 0, 1, 0 ); … … 1317 1317 dump_object( li->o, 0, 1, 0 ); 1318 1318 1319 fd_log_debug("###### Dumping types ####### \n");1319 fd_log_debug("###### Dumping types #######"); 1320 1320 1321 1321 dump_list( &dict->dict_types, 0, 2, 0 ); 1322 1322 1323 fd_log_debug("###### Dumping commands per name ####### \n");1323 fd_log_debug("###### Dumping commands per name #######"); 1324 1324 1325 1325 dump_list( &dict->dict_cmd_name, 0, 2, 0 ); 1326 1326 1327 fd_log_debug("###### Dumping commands per code and flags ####### \n");1327 fd_log_debug("###### Dumping commands per code and flags #######"); 1328 1328 1329 1329 dump_list( &dict->dict_cmd_code, 0, 0, 0 ); 1330 1330 1331 fd_log_debug("###### Statistics ####### \n");1331 fd_log_debug("###### Statistics #######"); 1332 1332 1333 1333 for (i=1; i<=DICT_TYPE_MAX; i++) 1334 fd_log_debug(" %5d objects of type %s \n", dict->dict_count[i], dict_obj_info[i].name);1335 1336 fd_log_debug("###################################################### \n");1334 fd_log_debug(" %5d objects of type %s", dict->dict_count[i], dict_obj_info[i].name); 1335 1336 fd_log_debug("######################################################"); 1337 1337 1338 1338 /* Free the rwlock */ … … 1867 1867 TRACE_DEBUG(INFO, "An existing object with different non-key data was found: EEXIST"); 1868 1868 if (TRACE_BOOL(INFO)) { 1869 fd_log_debug("New object to insert: \n");1869 fd_log_debug("New object to insert:"); 1870 1870 dump_object(new, 0, 0, 3); 1871 fd_log_debug("Object already in dictionary: \n");1871 fd_log_debug("Object already in dictionary:"); 1872 1872 dump_object(locref, 0, 0 , 3); 1873 1873 } -
libfdproto/fifo.c
r767 r974 115 115 return; 116 116 117 fd_log_debug("Dumping queue '%s' (%p): \n", name ?: "?", queue);117 fd_log_debug("Dumping queue '%s' (%p):", name ?: "?", queue); 118 118 if (!CHECK_FIFO( queue )) { 119 fd_log_debug(" Queue invalid! \n");119 fd_log_debug(" Queue invalid!"); 120 120 if (queue) 121 fd_log_debug(" (%x != %x) \n", queue->eyec, FIFO_EYEC);121 fd_log_debug(" (%x != %x)", queue->eyec, FIFO_EYEC); 122 122 return; 123 123 } 124 124 125 125 CHECK_POSIX_DO( pthread_mutex_lock( &queue->mtx ), /* continue */ ); 126 fd_log_debug(" %d elements in queue / %d threads waiting \n", queue->count, queue->thrs);127 fd_log_debug(" %d elements max / %d threads waiting to push \n", queue->max, queue->thrs_push);128 fd_log_debug(" thresholds: %d / %d (h:%d), cb: %p,%p (%p), highest: %d \n",126 fd_log_debug(" %d elements in queue / %d threads waiting", queue->count, queue->thrs); 127 fd_log_debug(" %d elements max / %d threads waiting to push", queue->max, queue->thrs_push); 128 fd_log_debug(" thresholds: %d / %d (h:%d), cb: %p,%p (%p), highest: %d", 129 129 queue->high, queue->low, queue->highest, 130 130 queue->h_cb, queue->l_cb, queue->data, … … 135 135 int i = 0; 136 136 for (li = queue->list.next; li != &queue->list; li = li->next) { 137 fd_log_debug(" [%i] item %p in fifo %p: \n", i++, li->o, queue);137 fd_log_debug(" [%i] item %p in fifo %p:", i++, li->o, queue); 138 138 (*dump_item)(level, li->o); 139 139 } -
libfdproto/init.c
r740 r974 40 40 if (TRACE_BOOL(ANNOYING)) { 41 41 if (str) { 42 fd_log_debug("(Thread '%s' terminating) \n", (char *)str);42 fd_log_debug("(Thread '%s' terminating)", (char *)str); 43 43 } 44 44 } -
libfdproto/log.c
r966 r974 166 166 if (TRACE_BOOL(ANNOYING)) { 167 167 if (val) { 168 fd_log_debug("(Thread '%s' renamed to '%s') \n", (char *)val, name?:"(nil)");168 fd_log_debug("(Thread '%s' renamed to '%s')", (char *)val, name?:"(nil)"); 169 169 } else { 170 fd_log_debug("(Thread %p named '%s') \n", pthread_self(), name?:"(nil)");170 fd_log_debug("(Thread %p named '%s')", pthread_self(), name?:"(nil)"); 171 171 } 172 172 } -
libfdproto/messages.c
r961 r974 829 829 char *outstr; 830 830 size_t offset, outlen; 831 CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p \n", msg); return; } );831 CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p", msg); return; } ); 832 832 do { 833 833 CHECK_FCT_DO( msg_dump_intern ( NONE, ref, indent, &outstr, &offset, &outlen ), 834 fd_log_debug_fstr(fstr, "Error while dumping %p \n", ref) );834 fd_log_debug_fstr(fstr, "Error while dumping %p", ref) ); 835 835 836 836 /* Now find the next object */ … … 841 841 842 842 /* now really output this in one shot, so it is not interrupted */ 843 fd_log_debug_fstr(fstr, "%s \n", outstr);843 fd_log_debug_fstr(fstr, "%s", outstr); 844 844 845 845 free(outstr); … … 849 849 char *outstr; 850 850 size_t offset, outlen; 851 CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p \n", msg); return; } );851 CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), { fd_log_debug_fstr(fstr, "Error initializing string for dumping %p", msg); return; } ); 852 852 CHECK_FCT_DO( msg_dump_intern ( NONE, msg, 2, &outstr, &offset, &outlen ), 853 fd_log_debug_fstr(fstr, "Error while dumping %p \n", msg) );853 fd_log_debug_fstr(fstr, "Error while dumping %p", msg) ); 854 854 /* now really output this in one shot, so it is not interrupted */ 855 fd_log_debug_fstr(fstr, "%s \n", outstr);855 fd_log_debug_fstr(fstr, "%s", outstr); 856 856 857 857 free(outstr); … … 866 866 size_t offset, outlen; 867 867 CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), 868 { fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p \n", obj); return; } );868 { fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p", obj); return; } ); 869 869 870 870 do { 871 871 CHECK_FCT_DO( msg_dump_intern ( level, ref, indent, &outstr, &offset, &outlen ), 872 fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p \n", ref) );872 fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p", ref) ); 873 873 874 874 /* Now find the next object */ … … 892 892 size_t offset, outlen; 893 893 CHECK_FCT_DO( dump_init_str(&outstr, &offset, &outlen), 894 { fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p \n", obj); return; } );894 { fd_log_debug_fstr(fd_g_debug_fstr, "Error initializing string for dumping %p", obj); return; } ); 895 895 CHECK_FCT_DO( msg_dump_intern ( level, obj, 1, &outstr, &offset, &outlen ), 896 fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p \n", obj) );896 fd_log_debug_fstr(fd_g_debug_fstr, "Error while dumping %p", obj) ); 897 897 TRACE_DEBUG(level, "------ Dumping object %p (s)-------", obj); 898 898 TRACE_DEBUG(level, "%s", outstr); -
libfdproto/msg_log.c
r928 r974 181 181 (void)pthread_mutex_unlock(&fd_log_lock); 182 182 183 fd_log_debug_fstr(fstr, " \n Logged: %s\n", buftime);183 fd_log_debug_fstr(fstr, " Logged: %s", buftime); 184 184 185 185 /* And now the message itself */ -
libfdproto/sessions.c
r928 r974 882 882 return; 883 883 884 fd_log_debug("\t %*s -- Session @%p -- \n", level, "", session);884 fd_log_debug("\t %*s -- Session @%p --", level, "", session); 885 885 if (!VALIDATE_SI(session)) { 886 fd_log_debug("\t %*s Invalid session object \n", level, "");886 fd_log_debug("\t %*s Invalid session object", level, ""); 887 887 } else { 888 888 889 fd_log_debug("\t %*s sid '%s'(%zd), hash %x, msg %d, destroyed %d \n", level, "", session->sid, session->sidlen, session->hash, session->msg_cnt, session->is_destroyed);889 fd_log_debug("\t %*s sid '%s'(%zd), hash %x, msg %d, destroyed %d", level, "", session->sid, session->sidlen, session->hash, session->msg_cnt, session->is_destroyed); 890 890 891 891 strftime(buf, sizeof(buf), "%D,%T", localtime_r( &session->timeout.tv_sec , &tm )); 892 fd_log_debug("\t %*s timeout %s.%09ld \n", level, "", buf, session->timeout.tv_nsec);892 fd_log_debug("\t %*s timeout %s.%09ld", level, "", buf, session->timeout.tv_nsec); 893 893 894 894 CHECK_POSIX_DO( pthread_mutex_lock(&session->stlock), /* ignore */ ); … … 896 896 for (li = session->states.next; li != &session->states; li = li->next) { 897 897 struct state * st = (struct state *)(li->o); 898 fd_log_debug("\t %*s handler %d registered data %p \n", level, "", st->hdl->id, st->state);898 fd_log_debug("\t %*s handler %d registered data %p", level, "", st->hdl->id, st->state); 899 899 } 900 900 pthread_cleanup_pop(0); 901 901 CHECK_POSIX_DO( pthread_mutex_unlock(&session->stlock), /* ignore */ ); 902 902 } 903 fd_log_debug("\t %*s -- end of session @%p -- \n", level, "", session);903 fd_log_debug("\t %*s -- end of session @%p --", level, "", session); 904 904 } 905 905 … … 909 909 return; 910 910 911 fd_log_debug("\t %*s -- Handler @%p -- \n", level, "", handler);911 fd_log_debug("\t %*s -- Handler @%p --", level, "", handler); 912 912 if (!VALIDATE_SH(handler)) { 913 fd_log_debug("\t %*s Invalid session handler object \n", level, "");913 fd_log_debug("\t %*s Invalid session handler object", level, ""); 914 914 } else { 915 fd_log_debug("\t %*s id %d, cleanup %p, opaque %p \n", level, "", handler->id, handler->cleanup, handler->opaque);916 } 917 fd_log_debug("\t %*s -- end of handler @%p -- \n", level, "", handler);915 fd_log_debug("\t %*s id %d, cleanup %p, opaque %p", level, "", handler->id, handler->cleanup, handler->opaque); 916 } 917 fd_log_debug("\t %*s -- end of handler @%p --", level, "", handler); 918 918 } 919 919 -
tests/testcnx.c
r859 r974 714 714 #if 0 715 715 /* For debug: dump the object */ 716 fd_log_debug("Dumping CER \n");716 fd_log_debug("Dumping CER"); 717 717 fd_msg_dump_walk(0, cer); 718 718 #endif -
tests/testmesg.c
r931 r974 61 61 #if 0 62 62 /* For debug: dump the object */ 63 fd_log_debug("Dumping Accounting-Request empty message \n");63 fd_log_debug("Dumping Accounting-Request empty message"); 64 64 fd_msg_dump_walk( 0, acr ); 65 65 #endif … … 78 78 #if 0 79 79 /* For debug: dump the object */ 80 fd_log_debug("Dumping Proxy-Info AVP \n");80 fd_log_debug("Dumping Proxy-Info AVP"); 81 81 fd_msg_dump_walk(0, pi); 82 fd_log_debug("Dumping dictionary model \n");82 fd_log_debug("Dumping dictionary model"); 83 83 fd_dict_dump_object(pi_model); 84 84 #endif … … 106 106 #if 0 107 107 /* For debug: dump the object */ 108 fd_log_debug("Dumping Accounting-Request with Proxy-Info AVP at the end \n");108 fd_log_debug("Dumping Accounting-Request with Proxy-Info AVP at the end"); 109 109 fd_msg_dump_walk(0, acr); 110 110 #endif … … 364 364 CHECK( 0, fd_msg_update_length ( avpi ) ); 365 365 #if 0 366 fd_log_debug("AVP no vendor, value 3.1415: \n");366 fd_log_debug("AVP no vendor, value 3.1415:"); 367 367 fd_msg_dump_one(0, avpi); 368 368 #endif … … 381 381 CHECK( 0, fd_msg_update_length ( avpi ) ); 382 382 #if 0 383 fd_log_debug("AVP vendor, value 0x123456789abcdeL: \n");383 fd_log_debug("AVP vendor, value 0x123456789abcdeL:"); 384 384 fd_msg_dump_one(0, avpi); 385 385 #endif … … 407 407 CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); 408 408 #if 0 409 fd_log_debug("AVP enum i32, value 2 (from const): \n");409 fd_log_debug("AVP enum i32, value 2 (from const):"); 410 410 fd_msg_dump_one(0, avpi); 411 411 #endif … … 428 428 CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); 429 429 #if 0 430 fd_log_debug("AVP enum i32, value -5 (from const): \n");430 fd_log_debug("AVP enum i32, value -5 (from const):"); 431 431 fd_msg_dump_one(0, avpi); 432 432 #endif … … 443 443 CHECK( 0, fd_msg_update_length ( avpi ) ); 444 444 #if 0 445 fd_log_debug("AVP vendor enum i32, value -10 (not const): \n");445 fd_log_debug("AVP vendor enum i32, value -10 (not const):"); 446 446 fd_msg_dump_one(0, avpi); 447 447 #endif … … 458 458 CHECK( 0, fd_msg_update_length ( avpi ) ); 459 459 #if 0 460 fd_log_debug("AVP octet string, 'This\\0 is a b...' \n");460 fd_log_debug("AVP octet string, 'This\\0 is a b...'"); 461 461 fd_msg_dump_one(0, avpi); 462 462 #endif … … 487 487 CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); 488 488 #if 0 489 fd_log_debug("AVP Enumuerated OctetString (from const): \n");489 fd_log_debug("AVP Enumuerated OctetString (from const):"); 490 490 fd_msg_dump_one(0, avpi); 491 491 #endif … … 512 512 CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); 513 513 #if 0 514 fd_log_debug("AVP Enumuerated OctetString (from const): \n");514 fd_log_debug("AVP Enumuerated OctetString (from const):"); 515 515 fd_msg_dump_one(0, avpi); 516 516 #endif … … 534 534 CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); 535 535 #if 0 536 fd_log_debug("AVP octet string, '1234678' \n");536 fd_log_debug("AVP octet string, '1234678'"); 537 537 fd_msg_dump_one(0, avpch); 538 538 #endif … … 547 547 CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); 548 548 #if 0 549 fd_log_debug("AVP octet string, '12346789' \n");549 fd_log_debug("AVP octet string, '12346789'"); 550 550 fd_msg_dump_one(0, avpch); 551 551 #endif
Note: See TracChangeset
for help on using the changeset viewer.