From 5537dbec1d9ac1504f77535f4433a388371982f5 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Mon, 19 Oct 2009 22:38:32 +0000 Subject: [PATCH] Fix comparision of invalid party name and number structs in comparison functions. git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1219 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/q931.c b/q931.c index 4287c6b..4c19dc7 100644 --- a/q931.c +++ b/q931.c @@ -381,6 +381,8 @@ int q931_party_name_cmp(const struct q931_party_name *left, const struct q931_pa return 0; } return -1; + } else if (!right->valid) { + return 1; } cmp = left->char_set - right->char_set; if (cmp) { @@ -413,6 +415,8 @@ int q931_party_number_cmp(const struct q931_party_number *left, const struct q93 return 0; } return -1; + } else if (!right->valid) { + return 1; } cmp = left->plan - right->plan; if (cmp) {