TC-User: make sure we don't include empty user_info if there is no user_info

This commit is contained in:
Harald Welte 2010-07-20 11:46:51 +02:00
parent a6d75256cd
commit facaed2396
1 changed files with 3 additions and 3 deletions

View File

@ -90,7 +90,7 @@ static int fill_tcap_dialg_ind(struct tcap_dialg_ind *tcdi,
}
/* copy the user_info */
if (user_info) {
if (user_info && user_info->list.count) {
EXTERNAL_t *ext;
if (user_info->list.count != 1)
return -EIO;
@ -166,9 +166,9 @@ int tcap_tcu_notice_ind(struct tcap_dialogue *td, uint32_t cause)
LIB_EXPORTED int tcap_user_req_dialg(enum tcap_primitive prim, struct tcap_dialg_ind *tcdi)
{
/* Allocate some structures on the stack */
OBJECT_IDENTIFIER_t *app_ctx;
OBJECT_IDENTIFIER_t *app_ctx = NULL;
EXTERNAL_t *ext;
struct user_information *user_info;
struct user_information *user_info = NULL;
struct tcap_dialogue *td;
int rc = 0;