@@ -240,11 +240,11 @@ static int dm_avps2json(void *root, cJSON *avps)
240240 memset (& ar , 0 , sizeof ar );
241241 ar .avp_code = h -> avp_code ;
242242 ar .avp_vendor = h -> avp_vendor ;
243- FD_CHECK_GT (fd_dict_search (fd_g_config -> cnf_dict , DICT_AVP , AVP_BY_CODE_AND_VENDOR ,
244- & ar , & obj , ENOENT ));
243+ __FD_CHECK_GT (fd_dict_search (fd_g_config -> cnf_dict , DICT_AVP , AVP_BY_CODE_AND_VENDOR ,
244+ & ar , & obj , ENOENT ), 0 , skip );
245245 } else {
246- FD_CHECK_GT (fd_dict_search (fd_g_config -> cnf_dict , DICT_AVP , AVP_BY_CODE ,
247- & h -> avp_code , & obj , ENOENT ));
246+ __FD_CHECK_GT (fd_dict_search (fd_g_config -> cnf_dict , DICT_AVP , AVP_BY_CODE ,
247+ & h -> avp_code , & obj , ENOENT ), 0 , skip );
248248 }
249249 FD_CHECK_GT (fd_dict_getval (obj , & dm_avp ));
250250
@@ -329,6 +329,7 @@ static int dm_avps2json(void *root, cJSON *avps)
329329 cJSON_AddItemToObject (item , dm_avp .avp_name , val );
330330 cJSON_AddItemToArray (avps , item );
331331
332+ skip :
332333 FD_CHECK_GT (fd_msg_browse (it , MSG_BRW_NEXT , & it , NULL ));
333334 i ++ ;
334335 }
@@ -339,7 +340,7 @@ static int dm_avps2json(void *root, cJSON *avps)
339340out :
340341 cJSON_Delete (item );
341342
342- LM_DBG ("------------ END AVP iteration ----------------\n" );
343+ LM_DBG ("------------ END AVP iteration (failure) ----------------\n" );
343344 return -1 ;
344345}
345346
0 commit comments