RE: [NeoStats-Devel] [Commits] r11 - trunk

"Justin Hammond" <justin-kLev/[email protected]>
Newsgroups gmane.comp.neostats.devel
Message-ID <[email protected]>
>  	DBAFetchRows("domains", load_dom);
>  	if (list_count(blsb.domains) == 0) {
>  		for (i = 0; stddomlist[i].type != 0; i++) {
> -			dl = os_malloc(sizeof(dom_list));
> +			dl = ns_malloc(sizeof(dom_list));
>  			strlcpy(dl->name, stddomlist[i].name, BUFSIZE);
>  			strlcpy(dl->domain, 
> stddomlist[i].domain, BUFSIZE);
>  			dl->type = stddomlist[i].type;
> +			/* Isn't this store pointless since we 
> just loaded the entry anyway??? */
>  			DBAStore("domains", dl->name, (void 
> *)dl, sizeof(dom_list));
>  			lnode_create_append(blsb.domains, dl);
>  		}
> 


Re, the comment above, Nope, not pointless (well, could be argued but listen
on) as if you follow the logic, we try to load the domains out of the DBA
backend, after loading, we check the size and if its 0 (ie, empty) then we
load the "defaults" and then save those defaults into the DBA backend.
Typically this code will only be executed once, when BLSB is initially
loaded.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.