Index: main/channel.c =================================================================== --- main/channel.c (revision 281181) +++ main/channel.c (working copy) @@ -7797,7 +7797,11 @@ * shipped to another machine. */ - if (!update || update->name) { + if (!update) { + return -1; + } + + if (update->name) { res = party_name_build_data(data + pos, datalen - pos, &id->name, label, &ies->name); if (res < 0) { @@ -7806,7 +7810,7 @@ pos += res; } - if (!update || update->number) { + if (update->number) { res = party_number_build_data(data + pos, datalen - pos, &id->number, label, &ies->number); if (res < 0) { @@ -7815,7 +7819,7 @@ pos += res; } - if (!update || update->subaddress) { + if (update->subaddress) { res = party_subaddress_build_data(data + pos, datalen - pos, &id->subaddress, label, &ies->subaddress); if (res < 0) { @@ -7838,10 +7842,10 @@ } /* *************** Party id combined presentation *************** */ - if (!update || update->number) { + if (update->number) { int presentation; - if (!update || update->name) { + if (update->name) { presentation = ast_party_id_presentation(id); } else { /*