diff --git a/apps/app_queue.c b/apps/app_queue.c index 1e3a493f5354240f5b80738960f438f9d0fe8112..e619ad91bf146981429c2605d34c7496c577f281 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -582,7 +582,7 @@ static int queue_hash_cb(const void *obj, const int flags) static int queue_cmp_cb(void *obj, void *arg, int flags) { struct call_queue *q = obj, *q2 = arg; - return !strcasecmp(q->name, q2->name) ? CMP_MATCH : 0; + return !strcasecmp(q->name, q2->name) ? CMP_MATCH | CMP_STOP : 0; } static inline struct call_queue *queue_ref(struct call_queue *q) @@ -872,7 +872,7 @@ static int member_hash_fn(const void *obj, const int flags) static int member_cmp_fn(void *obj1, void *obj2, int flags) { struct member *mem1 = obj1, *mem2 = obj2; - return strcasecmp(mem1->interface, mem2->interface) ? 0 : CMP_MATCH; + return strcasecmp(mem1->interface, mem2->interface) ? 0 : CMP_MATCH | CMP_STOP; } /*! diff --git a/channels/chan_console.c b/channels/chan_console.c index c9a59cab309e834c800134f940fe4f62591af4c1..92777f5ea06e7db31c5b839c09e5cfa726b5b80e 100644 --- a/channels/chan_console.c +++ b/channels/chan_console.c @@ -1432,7 +1432,7 @@ static int pvt_cmp_cb(void *obj, void *arg, int flags) { struct console_pvt *pvt = obj, *pvt2 = arg; - return !strcasecmp(pvt->name, pvt2->name) ? CMP_MATCH : 0; + return !strcasecmp(pvt->name, pvt2->name) ? CMP_MATCH | CMP_STOP : 0; } static void stop_streams(void) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index eb7383db396a917022578d6f47b15e4b45dd710a..d2727f4221f91e92ca92358549ed6671412a8b1c 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -1312,7 +1312,7 @@ static int peer_cmp_cb(void *obj, void *arg, int flags) { struct iax2_peer *peer = obj, *peer2 = arg; - return !strcmp(peer->name, peer2->name) ? CMP_MATCH : 0; + return !strcmp(peer->name, peer2->name) ? CMP_MATCH | CMP_STOP : 0; } /*! @@ -1332,7 +1332,7 @@ static int user_cmp_cb(void *obj, void *arg, int flags) { struct iax2_user *user = obj, *user2 = arg; - return !strcmp(user->name, user2->name) ? CMP_MATCH : 0; + return !strcmp(user->name, user2->name) ? CMP_MATCH | CMP_STOP : 0; } /*! @@ -12194,7 +12194,7 @@ static int pvt_cmp_cb(void *obj, void *arg, int flags) * against a full frame or not ... */ return match(&pvt2->addr, pvt2->peercallno, pvt2->callno, pvt, - pvt2->frames_received) ? CMP_MATCH : 0; + pvt2->frames_received) ? CMP_MATCH | CMP_STOP : 0; } /*! \brief Load IAX2 module, load configuraiton ---*/ diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 804599c76036395126c201557b39916b3b56e1ad..351a09782ca62f1557c9b9c43e658416d8d7fe4c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1651,7 +1651,7 @@ static int peer_cmp_cb(void *obj, void *arg, int flags) { struct sip_peer *peer = obj, *peer2 = arg; - return !strcasecmp(peer->name, peer2->name) ? CMP_MATCH : 0; + return !strcasecmp(peer->name, peer2->name) ? CMP_MATCH | CMP_STOP : 0; } /*! @@ -1683,11 +1683,11 @@ static int peer_ipcmp_cb(void *obj, void *arg, int flags) if (!ast_test_flag(&peer->flags[0], SIP_INSECURE_PORT) && !ast_test_flag(&peer2->flags[0], SIP_INSECURE_PORT)) { if (peer->addr.sin_port == peer2->addr.sin_port) - return CMP_MATCH; + return CMP_MATCH | CMP_STOP; else return 0; } - return CMP_MATCH; + return CMP_MATCH | CMP_STOP; } /*! @@ -1707,7 +1707,7 @@ static int dialog_cmp_cb(void *obj, void *arg, int flags) { struct sip_pvt *pvt = obj, *pvt2 = arg; - return !strcasecmp(pvt->callid, pvt2->callid) ? CMP_MATCH : 0; + return !strcasecmp(pvt->callid, pvt2->callid) ? CMP_MATCH | CMP_STOP : 0; } static int temp_pvt_init(void *); diff --git a/funcs/func_dialgroup.c b/funcs/func_dialgroup.c index 6a9596e62889cca5cc1eafb7cb2c785f068e6292..c3674beb93315f64b2afef867537f22d2c2410e9 100644 --- a/funcs/func_dialgroup.c +++ b/funcs/func_dialgroup.c @@ -67,9 +67,9 @@ static int group_cmp_fn(void *obj1, void *name2, int flags) struct group *g1 = obj1, *g2 = name2; char *name = name2; if (flags & OBJ_POINTER) - return strcmp(g1->name, g2->name) ? 0 : CMP_MATCH; + return strcmp(g1->name, g2->name) ? 0 : CMP_MATCH | CMP_STOP; else - return strcmp(g1->name, name) ? 0 : CMP_MATCH; + return strcmp(g1->name, name) ? 0 : CMP_MATCH | CMP_STOP; } static int entry_hash_fn(const void *obj, const int flags) @@ -83,9 +83,9 @@ static int entry_cmp_fn(void *obj1, void *name2, int flags) struct group_entry *e1 = obj1, *e2 = name2; char *name = name2; if (flags & OBJ_POINTER) - return strcmp(e1->name, e2->name) ? 0 : CMP_MATCH; + return strcmp(e1->name, e2->name) ? 0 : CMP_MATCH | CMP_STOP; else - return strcmp(e1->name, name) ? 0 : CMP_MATCH; + return strcmp(e1->name, name) ? 0 : CMP_MATCH | CMP_STOP; } static int dialgroup_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len) diff --git a/main/config.c b/main/config.c index 73f3865f894ab5f1f58ed1c452daa537b2e86c36..40b116a479e9bbfd3a5acf1dcca749c31f439df9 100644 --- a/main/config.c +++ b/main/config.c @@ -170,7 +170,7 @@ static int hash_string(const void *obj, const int flags) static int hashtab_compare_strings(void *a, void *b, int flags) { const struct inclfile *ae = a, *be = b; - return !strcmp(ae->fname, be->fname) ? CMP_MATCH : 0; + return !strcmp(ae->fname, be->fname) ? CMP_MATCH | CMP_STOP : 0; } static struct ast_config_map { diff --git a/main/features.c b/main/features.c index dd56f9bd35ea994223e781974f9987b10d537ae1..9d228acc2f6cd10c046aec22ef42c3c4e8f1cec1 100644 --- a/main/features.c +++ b/main/features.c @@ -230,7 +230,7 @@ static int parkinglot_hash_cb(const void *obj, const int flags) static int parkinglot_cmp_cb(void *obj, void *arg, int flags) { struct ast_parkinglot *parkinglot = obj, *parkinglot2 = arg; - return !strcasecmp(parkinglot->name, parkinglot2->name) ? CMP_MATCH : 0; + return !strcasecmp(parkinglot->name, parkinglot2->name) ? CMP_MATCH | CMP_STOP : 0; } /*! diff --git a/main/manager.c b/main/manager.c index 6d2c47f268e49c07dbcdc3c2b41ad2213d9bccb4..4aa1be631f6d74c6093f7bfc86701563a1995f6b 100644 --- a/main/manager.c +++ b/main/manager.c @@ -3566,7 +3566,7 @@ static int variable_count_cmp_fn(void *obj, void *vstr, int flags) * the address of both the struct and the string are exactly the same. */ struct variable_count *vc = obj; char *str = vstr; - return !strcmp(vc->varname, str) ? CMP_MATCH : 0; + return !strcmp(vc->varname, str) ? CMP_MATCH | CMP_STOP : 0; } /*! \brief Convert the input into XML or HTML. diff --git a/main/taskprocessor.c b/main/taskprocessor.c index d98d97f1c4a59b8cabeb999960287b12cebf6f23..450d579c10b0ec7e2e58d156defa623151f62a91 100644 --- a/main/taskprocessor.c +++ b/main/taskprocessor.c @@ -339,7 +339,7 @@ static int tps_cmp_cb(void *obj, void *arg, int flags) { struct ast_taskprocessor *lhs = obj, *rhs = arg; - return !strcasecmp(lhs->name, rhs->name) ? CMP_MATCH : 0; + return !strcasecmp(lhs->name, rhs->name) ? CMP_MATCH | CMP_STOP : 0; } /* destroy the taskprocessor */ diff --git a/res/ais/lck.c b/res/ais/lck.c index 7e7533dc6845a7bb9e9c891a984b03ffc134202d..04252ff8b04a9217bf3ae6b8dcd3233dca0879de 100644 --- a/res/ais/lck.c +++ b/res/ais/lck.c @@ -115,7 +115,7 @@ static int lock_cmp_cb(void *obj, void *arg, int flags) { struct lock_resource *lock1 = obj, *lock2 = arg; - return !strcasecmp(lock1->name, lock2->name) ? CMP_MATCH : 0; + return !strcasecmp(lock1->name, lock2->name) ? CMP_MATCH | CMP_STOP : 0; } static int lock_resources_init(void *data) diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c index 3fcc19a19a0ca0d15e928b8c85eb1de9e552a1d0..54c094294d4b65ece64f6d1d28a0f1a8d10ebf1f 100644 --- a/res/res_phoneprov.c +++ b/res/res_phoneprov.c @@ -249,7 +249,7 @@ static int profile_cmp_fn(void *obj, void *arg, int flags) { const struct phone_profile *profile1 = obj, *profile2 = arg; - return !strcasecmp(profile1->name, profile2->name) ? CMP_MATCH : 0; + return !strcasecmp(profile1->name, profile2->name) ? CMP_MATCH | CMP_STOP : 0; } static void delete_file(struct phoneprov_file *file) @@ -295,7 +295,7 @@ static int routes_cmp_fn(void *obj, void *arg, int flags) { const struct http_route *route1 = obj, *route2 = arg; - return !strcmp(route1->uri, route2->uri) ? CMP_MATCH : 0; + return !strcmp(route1->uri, route2->uri) ? CMP_MATCH | CMP_STOP : 0; } static void route_destructor(void *obj) @@ -784,7 +784,7 @@ static int users_cmp_fn(void *obj, void *arg, int flags) { const struct user *user1 = obj, *user2 = arg; - return !strcasecmp(user1->macaddress, user2->macaddress) ? CMP_MATCH : 0; + return !strcasecmp(user1->macaddress, user2->macaddress) ? CMP_MATCH | CMP_STOP : 0; } /*! \brief Free all memory associated with a user */ diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c index 187fd2bfb60c907a2508d96462cfe7d46e174ea2..6e57246a67fffa40feb2088a941ba5ae2d9effc0 100644 --- a/res/res_timing_pthread.c +++ b/res/res_timing_pthread.c @@ -308,7 +308,7 @@ static int pthread_timer_cmp(void *obj, void *arg, int flags) { struct pthread_timer *timer1 = obj, *timer2 = arg; - return (timer1->pipe[PIPE_READ] == timer2->pipe[PIPE_READ]) ? CMP_MATCH : 0; + return (timer1->pipe[PIPE_READ] == timer2->pipe[PIPE_READ]) ? CMP_MATCH | CMP_STOP : 0; } /*! diff --git a/utils/hashtest2.c b/utils/hashtest2.c index 27ed30722016b198f537a1bd1892fa7efdc43176..3b0c626997fc4d755c2101ec32a34815079d3f4a 100644 --- a/utils/hashtest2.c +++ b/utils/hashtest2.c @@ -83,7 +83,7 @@ static int hash_string(const void *obj, const int flags) static int hashtab_compare_strings(void *a, void *b, int flags) { const struct ht_element *ae = a, *be = b; - return !strcmp(ae->key, be->key) ? CMP_MATCH : 0; + return !strcmp(ae->key, be->key) ? CMP_MATCH | CMP_STOP : 0; } /* random numbers */