Changeset 1119:79dd22145f52 in freeDiameter
- Timestamp:
- May 14, 2013, 12:04:20 PM (11 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r1091 r1119 52 52 SET(CMAKE_C_FLAGS_DEBIANPACKAGE "${CMAKE_C_FLAGS_RELWITHDEBINFO}") 53 53 54 # Set the "Debug" flags 55 SET(CMAKE_C_FLAGS_DEBUG "-Wall -g -O0") 56 54 57 # Add a "DebugValgrind" build type used for checking execution with Valgrind tool 55 58 SET(CMAKE_C_FLAGS_DEBUGVALGRIND "-Wall -g -O0") -
extensions/app_radgw/rgw_clients.c
r1107 r1119 976 976 char sa_buf[sSA_DUMP_STRLEN]; 977 977 client = (struct rgw_client *)ref; 978 /* TODO: use a fct param instead of hardcoded FD_LOG_DEBUG */ 979 TODO("Replace with appropriate code"); 980 /* TRACE_sSA(FD_LOG_DEBUG, NONE, " - ", client->sa, NI_NUMERICHOST | NI_NUMERICSERV, (client->type == RGW_CLI_NAS) ? "" : " [PROXY]" ); */ 978 fd_sa_sdump_numeric(sa_buf, client->sa); 979 LOG_D(" - %s%s", sa_buf, (client->type == RGW_CLI_NAS) ? "" : " [PROXY]" ); 981 980 } 982 981 } -
extensions/app_radgw/rgwx_acct.c
r1105 r1119 1220 1220 out: 1221 1221 if (answer && *answer) { 1222 TRACE_DEBUG(INFO, "Received the following problematic STA message, discarding anyway..."); 1223 fd_msg_dump_walk( INFO, *answer ); 1222 char * buf = NULL; size_t buflen; 1223 CHECK_MALLOC_DO( fd_msg_dump_treeview(&buf, &buflen, NULL, *answer, NULL, 0, 1), ); 1224 TRACE_DEBUG(INFO, "Received the following problematic STA message, discarding anyway: %s", buf ?: "<error>"); 1225 free(buf); 1226 1224 1227 fd_msg_free(*answer); 1225 1228 *answer = NULL; -
extensions/app_radgw/rgwx_auth.c
r1088 r1119 126 126 127 127 struct sess_state { 128 charreq_auth[16];128 uint8_t req_auth[16]; 129 129 }; 130 130 -
extensions/app_radgw/rgwx_debug.c
r996 r1119 95 95 fd_log_debug(" Diameter message: NULL pointer"); 96 96 } else { 97 fd_log_debug(" Diameter message (%p) DUMP:", *diam_fw); 98 fd_msg_dump_walk(0, *diam_fw); 97 char * buf = NULL; size_t buflen; 98 CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, *diam_fw, NULL, 0, 1) ); 99 fd_log_debug(" Diameter message (%p) DUMP: %s", *diam_fw, buf); 100 free(buf); 99 101 } 100 102 … … 114 116 fd_log_debug(" Diameter message: NULL pointer"); 115 117 } else { 116 fd_log_debug(" Diameter message (%p) DUMP:", *diam_ans); 117 fd_msg_dump_walk(0, *diam_ans); 118 char * buf = NULL; size_t buflen; 119 CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, *diam_ans, NULL, 0, 1) ); 120 fd_log_debug(" Diameter message (%p) DUMP: %s", *diam_ans, buf); 121 free(buf); 118 122 } 119 123 -
extensions/app_radgw/rgwx_echodrop.c
r1088 r1119 62 62 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); 63 63 } 64 return *buf; 64 65 } 65 66 -
extensions/app_radgw/rgwx_sip.c
r1088 r1119 723 723 struct avp_hdr *ahdr; 724 724 //char buf[254]; /* to store some attributes values (with final '\0') */ 725 unsigned char * req_sip = NULL;726 725 struct session * sess; 727 726 os0_t sid = NULL; -
extensions/app_sip/locationinfo.c
r639 r1119 201 201 CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); 202 202 203 //DEBUG204 fd_msg_dump_walk(INFO,qry);205 fd_msg_dump_walk(INFO,ans);206 207 203 CHECK_FCT( fd_msg_send( msg, NULL, NULL )); 208 204 -
extensions/dbg_interactive/dbg_interactive.i
r1021 r1119 152 152 /* Forward declaration for the peers module */ 153 153 static void fd_add_cb(struct peer_info *peer, void *data); 154 155 /* This one gives problems when included from the header file */ 156 void fd_log_va( int, const char *, va_list); 157 void fd_log_deprecated( int level, const char *format, ... ) MARK_DEPRECATED 158 { 159 va_list ap; 160 va_start(ap, format); 161 fd_log_va(level, format, ap); 162 va_end(ap); 163 } 164 154 165 %} 155 166 -
extensions/dbg_rt/dbg_rt.c
r974 r1119 46 46 static int dbgrt_fwd_cb(void * cbdata, struct msg ** msg) 47 47 { 48 char * buf = NULL; size_t buflen; 48 49 TRACE_ENTRY("%p %p", cbdata, msg); 49 50 50 fd_log_debug("[dbg_rt] FWD routing message: %p", msg ? *msg : NULL); 51 if (msg) 52 fd_msg_dump_walk(INFO, *msg); 53 51 LOG_D("[dbg_rt] FWD routing message: %p", msg ? *msg : NULL); 52 if (msg) { 53 CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, *msg, NULL, 0, 1) ); 54 LOG_D("%s", buf); 55 } 56 free(buf); 54 57 return 0; 55 58 } … … 59 62 { 60 63 struct fd_list * li; 64 char * buf = NULL; size_t buflen; 61 65 62 66 TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); 63 67 64 fd_log_debug("[dbg_rt] OUT routing message: %p", msg); 65 fd_msg_dump_walk(INFO, msg); 66 fd_log_debug("[dbg_rt] Current list of candidates (%p): (score - id)", msg); 68 LOG_D("[dbg_rt] OUT routing message: %p", msg); 69 CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, msg, NULL, 0, 1) ); 70 LOG_D("%s", buf); 71 LOG_D("[dbg_rt] Current list of candidates (%p): (score - id)", msg); 67 72 68 73 for (li = candidates->next; li != candidates; li = li->next) { 69 74 struct rtd_candidate *c = (struct rtd_candidate *) li; 70 fd_log_debug("[dbg_rt] %d -\t%s", c->score, c->diamid);75 LOG_D("[dbg_rt] %d -\t%s", c->score, c->diamid); 71 76 } 72 77 -
extensions/test_sip/locationinfo.c
r924 r1119 111 111 } 112 112 113 fd_msg_dump_walk(INFO,message);114 113 CHECK_FCT( fd_msg_send( &message, NULL, NULL )); 115 114 -
extensions/test_sip/locationinfosl.c
r924 r1119 113 113 } 114 114 115 fd_msg_dump_walk(INFO,message);116 115 CHECK_FCT( fd_msg_send( &message, NULL, NULL )); 117 116 -
extensions/test_sip/serverassignment.c
r924 r1119 154 154 } 155 155 156 fd_msg_dump_walk(INFO,message);157 156 CHECK_FCT( fd_msg_send( &message, NULL, NULL )); 158 157 -
extensions/test_sip/userauthorization.c
r924 r1119 145 145 } 146 146 147 fd_msg_dump_walk(INFO,message);148 147 CHECK_FCT( fd_msg_send( &message, NULL, NULL )); 149 148 -
include/freeDiameter/libfdproto.h
r1117 r1119 147 147 void fd_log ( int, const char *, ... ) _ATTRIBUTE_PRINTFLIKE_(2,3); 148 148 #ifndef SWIG 149 void fd_log_va( int, const char *, va_list args);149 void fd_log_va( int, const char *, va_list); 150 150 #endif /* SWIG */ 151 151 … … 464 464 } 465 465 466 #ifndef SWIG 466 467 static __inline__ void fd_log_deprecated( int level, const char *format, ... ) MARK_DEPRECATED 467 468 { … … 469 470 va_start(ap, format); 470 471 fd_log_va(level, format, ap); 471 va_end(ap); 472 va_end(ap); 472 473 } 474 #else /* SWIG */ 475 void fd_log_deprecated( int level, const char *format, ... ); 476 #endif /* SWIG */ 473 477 static __inline__ void replace_me() MARK_DEPRECATED { } 474 478 … … 545 549 if ( ! (__bool__) ) { \ 546 550 int __ret__ = EINVAL; \ 547 TRACE_ERROR("ERROR: invalid parameter '%s'", #__bool__ );\551 TRACE_ERROR("ERROR: Invalid parameter '%s', %d", #__bool__, __ret__ ); \ 548 552 __fallback__; \ 549 553 } \ … … 1231 1235 dict_avpdata_interpret type_interpret;/* cb to convert the AVP value in more comprehensive format (or NULL) */ 1232 1236 dict_avpdata_encode type_encode; /* cb to convert formatted data into an AVP value (or NULL) */ 1233 DECLARE_FD_DUMP_PROTOTYPE((*type_dump), union avp_value * val); /* cb called by fd_msg_dump_ onefor this type of data (if != NULL). Returned string must be freed. */1237 DECLARE_FD_DUMP_PROTOTYPE((*type_dump), union avp_value * val); /* cb called by fd_msg_dump_* for this type of data (if != NULL). Returned string must be freed. */ 1234 1238 }; 1235 1239 -
libfdcore/config.c
r1113 r1119 85 85 FD_DUMP_HANDLE_OFFSET(); 86 86 87 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "freeDiameter configuration:\n" , fd_g_config), return NULL);87 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "freeDiameter configuration:\n"), return NULL); 88 88 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Default trace level .... : %+d\n", fd_g_debug_lvl), return NULL); 89 89 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Configuration file ..... : %s\n", fd_g_config->cnf_file), return NULL); -
libfdcore/core.c
r1112 r1119 320 320 int fd_core_wait_shutdown_complete(void) 321 321 { 322 int ret;323 322 enum core_state cur_state = core_state_get(); 324 323 void * th_ret = NULL; -
libfdcore/endpoints.c
r1113 r1119 328 328 } 329 329 } 330 } 331 330 return *buf; 331 } 332 -
libfdcore/p_ce.c
r1113 r1119 275 275 if (hdr->avp_flags & AVP_FLAG_VENDOR) { 276 276 /* Ignore all vendor-specific AVPs in CER/CEA because we don't support any currently */ 277 TRACE_DEBUG(FULL, "Ignored a vendor AVP in CER / CEA"); 278 fd_msg_dump_one(FULL, avp); 277 LOG_A("Ignored a vendor-specific AVP in CER / CEA"); 279 278 goto next; 280 279 } … … 284 283 if (hdr->avp_value == NULL) { 285 284 /* This is a sanity check */ 286 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 287 fd_msg_dump_one(NONE, avp); 285 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 288 286 ASSERT(0); /* To check if this really happens, and understand why... */ 289 287 goto next; … … 297 295 if (hdr->avp_value == NULL) { 298 296 /* This is a sanity check */ 299 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 300 fd_msg_dump_one(NONE, avp); 297 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 301 298 ASSERT(0); /* To check if this really happens, and understand why... */ 302 299 goto next; … … 319 316 if (hdr->avp_value == NULL) { 320 317 /* This is a sanity check */ 321 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 322 fd_msg_dump_one(NONE, avp); 318 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 323 319 ASSERT(0); /* To check if this really happens, and understand why... */ 324 320 goto next; … … 350 346 if (hdr->avp_value == NULL) { 351 347 /* This is a sanity check */ 352 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 353 fd_msg_dump_one(NONE, avp); 348 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 354 349 ASSERT(0); /* To check if this really happens, and understand why... */ 355 350 goto next; … … 376 371 if (hdr->avp_value == NULL) { 377 372 /* This is a sanity check */ 378 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 379 fd_msg_dump_one(NONE, avp); 373 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 380 374 ASSERT(0); /* To check if this really happens, and understand why... */ 381 375 goto next; … … 397 391 if (hdr->avp_value == NULL) { 398 392 /* This is a sanity check */ 399 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 400 fd_msg_dump_one(NONE, avp); 393 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 401 394 ASSERT(0); /* To check if this really happens, and understand why... */ 402 395 goto next; … … 419 412 if (hdr->avp_value == NULL) { 420 413 /* This is a sanity check */ 421 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 422 fd_msg_dump_one(NONE, avp); 414 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 423 415 ASSERT(0); /* To check if this really happens, and understand why... */ 424 416 goto next; … … 440 432 if (hdr->avp_value == NULL) { 441 433 /* This is a sanity check */ 442 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 443 fd_msg_dump_one(NONE, avp); 434 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 444 435 ASSERT(0); /* To check if this really happens, and understand why... */ 445 436 goto next; … … 468 459 469 460 if (inhdr->avp_flags & AVP_FLAG_VENDOR) { 470 TRACE_DEBUG(FULL, "Ignored a vendor AVP inside Vendor-Specific-Application-Id AVP"); 471 fd_msg_dump_one(FULL, avp); 461 LOG_A("Ignored a vendor AVP inside Vendor-Specific-Application-Id AVP"); 472 462 goto innext; 473 463 } … … 475 465 if (inhdr->avp_value == NULL) { 476 466 /* This is a sanity check */ 477 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 478 fd_msg_dump_one(NONE, avp); 467 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 479 468 ASSERT(0); /* To check if this really happens, and understand why... */ 480 469 goto innext; … … 508 497 509 498 if (invalid) { 510 TRACE_DEBUG(FULL, "Invalid Vendor-Specific-Application-Id AVP received, ignored"); 511 fd_msg_dump_one(FULL, avp); 499 TRACE_DEBUG(FULL, "Invalid Vendor-Specific-Application-Id AVP received"); 512 500 error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; 513 501 error->pei_avp = avp; … … 533 521 if (hdr->avp_value == NULL) { 534 522 /* This is a sanity check */ 535 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 536 fd_msg_dump_one(NONE, avp); 523 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 537 524 ASSERT(0); /* To check if this really happens, and understand why... */ 538 525 goto next; … … 549 536 if (hdr->avp_value == NULL) { 550 537 /* This is a sanity check */ 551 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 552 fd_msg_dump_one(NONE, avp); 538 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 553 539 ASSERT(0); /* To check if this really happens, and understand why... */ 554 540 goto next; … … 566 552 if (hdr->avp_value == NULL) { 567 553 /* This is a sanity check */ 568 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 569 fd_msg_dump_one(NONE, avp); 554 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 570 555 ASSERT(0); /* To check if this really happens, and understand why... */ 571 556 goto next; … … 578 563 if (hdr->avp_value == NULL) { 579 564 /* This is a sanity check */ 580 TRACE_DEBUG(NONE, "Ignored an AVP with unset value in CER/CEA"); 581 fd_msg_dump_one(NONE, avp); 565 LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); 582 566 ASSERT(0); /* To check if this really happens, and understand why... */ 583 567 goto next; -
libfdcore/p_dp.c
r1010 r1119 76 76 if (hdr->avp_value == NULL) { 77 77 /* This is a sanity check */ 78 TRACE_DEBUG(NONE, "BUG: Unset value in Disconnect-Cause in DPR"); 79 fd_msg_dump_one(NONE, dc); 78 LOG_F("BUG: Unset value in Disconnect-Cause in DPR"); 80 79 ASSERT(0); /* To check if this really happens, and understand why... */ 81 80 } -
libfdcore/p_dw.c
r974 r1119 51 51 if (hdr->avp_value == NULL) { 52 52 /* This is a sanity check */ 53 TRACE_DEBUG(NONE, "BUG: Unset value in Origin-State-Id in DWR / DWA"); 54 fd_msg_dump_one(NONE, osi); 53 LOG_F("Ignored an Origin-State-Id AVP with unset value in DWR/DWA"); 55 54 ASSERT(0); /* To check if this really happens, and understand why... */ 56 55 } -
libfdcore/p_out.c
r1113 r1119 132 132 if (msg) { 133 133 char buf[256]; 134 snprintf(buf, sizeof(buf), "Error while sending this message: s", strerror(ret));134 snprintf(buf, sizeof(buf), "Error while sending this message: %s", strerror(ret)); 135 135 fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg)); 136 136 fd_msg_free(msg); … … 186 186 if (msg) { 187 187 char buf[256]; 188 snprintf(buf, sizeof(buf), "Error while sending this message: s", strerror(ret));188 snprintf(buf, sizeof(buf), "Error while sending this message: %s", strerror(ret)); 189 189 fd_hook_call(HOOK_MESSAGE_DROPPED, *msg, NULL, buf, fd_msg_pmdl_get(*msg)); 190 190 fd_msg_free(*msg); -
libfdcore/p_sr.c
r1113 r1119 80 80 (long)((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 (long)((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))); 82 83 fd_msg_dump_one(ANNOYING + 1, sr->req);84 82 } 85 83 } -
libfdcore/routing_dispatch.c
r1113 r1119 429 429 { 430 430 struct msg_hdr * hdr; 431 int is_req = 0 , ret;431 int is_req = 0; 432 432 struct session * sess; 433 433 enum disp_action action; … … 1079 1079 } 1080 1080 1081 if (TRACE_BOOL(FULL)) { 1082 TRACE_DEBUG(FULL, "Picked next message (%s)", action_name); 1083 fd_msg_dump_one(ANNOYING, msg); 1084 } 1081 LOG_A("%s: Picked next message", action_name); 1085 1082 1086 1083 /* Now process the message */ -
libfdproto/dictionary.c
r1093 r1119 1278 1278 } 1279 1279 } 1280 return *buf; 1280 1281 } 1281 1282 -
libfdproto/log.c
r1094 r1119 212 212 static size_t get_mempagesz(void) { 213 213 if (!sys_mempagesz) { 214 sys_mempagesz = sysconf(_SC_PAGESIZE); /* We alloc buffer by memory pages for efficiency */214 sys_mempagesz = sysconf(_SC_PAGESIZE); /* We alloc buffer by memory pages for efficiency. This can be readjusted if too memory consuming */ 215 215 if (sys_mempagesz <= 0) 216 sys_mempagesz = 1024; /* default size if above call failed */216 sys_mempagesz = 256; /* default size if above call failed */ 217 217 } 218 218 return sys_mempagesz; -
libfdproto/messages.c
r1113 r1119 921 921 922 922 if (!CHECK_MSG(msg)) { 923 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID MESSAGE" , msg), return NULL);923 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID MESSAGE"), return NULL); 924 924 return *buf; 925 925 } … … 955 955 int success = 0; 956 956 struct dict_avp_data dictdata; 957 struct dict_vendor_data vendordata;958 struct dict_vendor_data *vendorinfo = NULL;959 960 957 961 958 if (level) { … … 1153 1150 } 1154 1151 1155 #ifndef OLD_CODE_TO_BE_REPLACED1156 void fd_msg_dump_walk ( int level, msg_or_avp *obj )1157 {1158 LOG_D("fd_msg_dump_walk %d, %p is deprecated", level, obj);1159 }1160 void fd_msg_dump_one ( int level, msg_or_avp * obj )1161 {1162 LOG_D("fd_msg_dump_one %d, %p is deprecated", level, obj);1163 }1164 #endif1165 1152 /***************************************************************************************************************/ 1166 1153 /* Simple meta-data management */ … … 2058 2045 2059 2046 if (mandatory && (avp->avp_public.avp_flags & AVP_FLAG_MANDATORY)) { 2060 TRACE_DEBUG(INFO, "Unsupported mandatory AVP found:"); 2061 fd_msg_dump_one(INFO, avp); 2047 TRACE_DEBUG(INFO, "Unsupported mandatory AVP found"); 2062 2048 if (error_info) { 2063 2049 error_info->pei_errcode = "DIAMETER_AVP_UNSUPPORTED"; 2064 2050 error_info->pei_avp = avp; 2051 } else { 2052 char * buf = NULL; 2053 size_t buflen; 2054 CHECK_MALLOC(fd_msg_dump_treeview(&buf, &buflen, NULL, avp, NULL, 0, 0)); 2055 LOG_E("Unsupported AVP: %s", buf); 2056 free(buf); 2065 2057 } 2066 2058 return ENOTSUP; … … 2102 2094 if ((avp_value_sizes[dictdata.avp_basetype] != 0) && 2103 2095 (avp->avp_public.avp_len - GETAVPHDRSZ( avp->avp_public.avp_flags ) != avp_value_sizes[dictdata.avp_basetype])) { 2104 TRACE_DEBUG(INFO, "The AVP size is not suitable for the type:"); 2105 fd_msg_dump_one(INFO, avp); 2096 TRACE_DEBUG(INFO, "The AVP size is not suitable for the type"); 2106 2097 if (error_info) { 2107 2098 error_info->pei_errcode = "DIAMETER_INVALID_AVP_LENGTH"; … … 2109 2100 snprintf(error_message, sizeof(error_message), "I expected a size of %d for this AVP according to my dictionary", avp_value_sizes[dictdata.avp_basetype]); 2110 2101 error_info->pei_message = error_message; 2102 } else { 2103 char * buf = NULL; 2104 size_t buflen; 2105 CHECK_MALLOC(fd_msg_dump_treeview(&buf, &buflen, NULL, avp, NULL, 0, 0)); 2106 LOG_E("Invalid length AVP: %s", buf); 2107 free(buf); 2111 2108 } 2112 2109 avp->avp_model = NULL; -
libfdproto/rt_data.c
r1097 r1119 252 252 int fd_rtd_get_nb_attempts(struct rt_data * rtd, int * sendingattemtps) 253 253 { 254 struct fd_list * li;255 int match = 0;256 257 254 TRACE_ENTRY("%p %p", rtd, sendingattemtps); 258 255 CHECK_PARAMS( rtd && sendingattemtps ); -
libfdproto/utils.c
r1103 r1119 66 66 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s", gai_strerror(rc)), return NULL); 67 67 } else { 68 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s( s)", &addrbuf[0], &servbuf[0]), return NULL);68 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s(%s)", &addrbuf[0], &servbuf[0]), return NULL); 69 69 } 70 70 } else { -
tests/testmesg_stress.c
r1093 r1119 53 53 { 54 54 struct msg * acr = NULL; 55 struct avp * pi = NULL, *avp1, *avp2;56 55 unsigned char * buf = NULL; 57 56 … … 217 216 struct msg * msg = NULL; 218 217 struct dict_object * avp_model = NULL; 219 struct avp * avp = NULL;220 218 union avp_value value; 221 219 … … 226 224 struct avp * avpi = NULL; 227 225 struct avp * avpch = NULL; 228 struct avp_hdr * avpdata = NULL;229 226 struct msg_hdr * msgdata = NULL; 230 227 #define ADD_AVP( _parent, _position, _avpi, _avpvendor, _avpname) { \ … … 392 389 struct timespec start, end; 393 390 394 struct msg * msg;395 396 397 391 /* Create the copies of the message buffer */ 398 392 stress_array = calloc(test_parameter, sizeof(struct stress_struct));
Note: See TracChangeset
for help on using the changeset viewer.