librpc/ndr: call ndr_table_list() from all ndr_X functions.
authorGünther Deschner <gd@samba.org>
Mon, 12 Aug 2013 15:22:15 +0000 (17:22 +0200)
committerGünther Deschner <gd@samba.org>
Fri, 20 Sep 2013 11:06:50 +0000 (13:06 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
librpc/ndr/ndr_table.c

index 7ca04173f70495df4cdaa80ce2f656516709404b..01d909436fe5134c162741bacc99594920025677 100644 (file)
@@ -73,7 +73,7 @@ const char *ndr_interface_name(const struct GUID *uuid, uint32_t if_version)
 int ndr_interface_num_calls(const struct GUID *uuid, uint32_t if_version)
 {
        const struct ndr_interface_list *l;
-       for (l=ndr_interfaces;l;l=l->next){
+       for (l=ndr_table_list();l;l=l->next){
                if (GUID_equal(&l->table->syntax_id.uuid, uuid) &&
                    l->table->syntax_id.if_version == if_version) {
                        return l->table->num_calls;
@@ -89,7 +89,7 @@ int ndr_interface_num_calls(const struct GUID *uuid, uint32_t if_version)
 const struct ndr_interface_table *ndr_table_by_name(const char *name)
 {
        const struct ndr_interface_list *l;
-       for (l=ndr_interfaces;l;l=l->next) {
+       for (l=ndr_table_list();l;l=l->next) {
                if (strcasecmp(l->table->name, name) == 0) {
                        return l->table;
                }
@@ -103,7 +103,7 @@ const struct ndr_interface_table *ndr_table_by_name(const char *name)
 const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid)
 {
        const struct ndr_interface_list *l;
-       for (l=ndr_interfaces;l;l=l->next) {
+       for (l=ndr_table_list();l;l=l->next) {
                if (GUID_equal(&l->table->syntax_id.uuid, uuid)) {
                        return l->table;
                }