comparison libfdcore/extensions.c @ 1242:b25ca6134bdc

Fix configuration dump when no extension is loaded
author Sebastien Decugis <sdecugis@freediameter.net>
date Mon, 11 Nov 2013 14:42:02 +0800
parents cec3e9b579e1
children
comparison
equal deleted inserted replaced
1241:12c3e0c7fa0b 1242:b25ca6134bdc
80 DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump) 80 DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump)
81 { 81 {
82 struct fd_list * li; 82 struct fd_list * li;
83 FD_DUMP_HANDLE_OFFSET(); 83 FD_DUMP_HANDLE_OFFSET();
84 84
85 for (li = ext_list.next; li != &ext_list; li = li->next) 85 if (FD_IS_LIST_EMPTY(&ext_list)) {
86 { 86 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "-none-"), return NULL);
87 struct fd_ext_info * ext = (struct fd_ext_info *)li; 87 } else {
88 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'[%s], %sloaded%s", 88 for (li = ext_list.next; li != &ext_list; li = li->next)
89 ext->filename, 89 {
90 ext->conffile?:"(no config file)", 90 struct fd_ext_info * ext = (struct fd_ext_info *)li;
91 ext->handler ? "" : "not ", (li->next == &ext_list) ? "":"\n"), return NULL); 91 CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'[%s], %sloaded%s",
92 ext->filename,
93 ext->conffile?:"(no config file)",
94 ext->handler ? "" : "not ", (li->next == &ext_list) ? "":"\n"), return NULL);
95 }
92 } 96 }
93 return *buf; 97 return *buf;
94 } 98 }
95 99
96 /* Check the dependencies. The object must have been dlopened already. */ 100 /* Check the dependencies. The object must have been dlopened already. */
"Welcome to our mercurial repository"