Added some comments to call out potential funkiness.

This commit is contained in:
waterson%netscape.com 1999-01-07 05:29:31 +00:00
Родитель 743adb567d
Коммит 2f9e197491
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -550,6 +550,8 @@ ServiceImpl::GetNamedDataSource(const char* uri, nsIRDFDataSource** dataSource)
nsIRDFDataSource* ds =
NS_STATIC_CAST(nsIRDFDataSource*, PL_HashTableLookup(mNamedDataSources, uri));
// XXX if it's not a named data source, and it looks like it might be
// a URL, then try to create a stream data source on the URL.
if (! ds) {
size_t len = strlen(uri);
if ((len > 4) && (strcmp(&uri[len-4], ".rdf") == 0)) {
@ -558,6 +560,8 @@ ServiceImpl::GetNamedDataSource(const char* uri, nsIRDFDataSource** dataSource)
return NS_ERROR_ILLEGAL_VALUE;
} else {
ds->Init(uri);
// XXX do we really want to globally register this datasource?
RegisterNamedDataSource(uri, ds);
}
} else return NS_ERROR_ILLEGAL_VALUE;