Re: [RFT] new store file/spool approach (fixed)

Alexander Malysh <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
Kalle Marjola wrote:

> 
>> >  a) seems like the directory must exist already or bad things happen
>> 
>> hmm, store_init returns -1 if directory doesn't exists and it's up to
>> higher layer to check this (bearerbox init code). I don't like the idea
>> to create directory if it doesn't exists and also the idea to panic in
>> this case. IMHO we have to much panics spread across kannel for such low
>> level things and higher layer should check return values and make
>> decisions.
>> 
> However there is one difference: in old store, if the file did not exist
> that only meant that well there is no old messages; new ones were still
> stored. In this case nothing will get stored, but unless the user is
> observant, he won't notice this (or I'm missing something here)

hmm, I don't see difference... If user has enabled store-dir then 'static
Octstr *spool' is not NULL and we store messages... if while starting
spooldir doesn't exists we return -1 to higher layer and this should decide
how to process further. (or I'm on the wrong trip?;))

> (okay, I'm not sure what happens if the store file cannot be later on
> created.. just errors I guess..)
> 
> Hence, either panic or create the directory. But I can live with current
> behaviour, too..
> 
> 
> 
>> yep, good point... 'store-dir' is a good one?
>> 
> Yes, see below.
> 
> 
>> real benefit is that store spool dir is slower as e.g. store file + your
>> patch (dict approach) (if your gateway has enough RAM to store messages
>> twice). so user will make decision which type to use (but default:
>> store-dir :)).
>> 
> Well in that case I would suggest that we have both :]
> Which one is used depends on config setting:
> store-file : the old (and I will patch it with that previous patch)
> store-dir: the new one
> 
> ..and yell if both set...

yep should work too... would you please patch current/old bb_store and I
will create patch against this version?

> 
> 

-- 
Thanks,
Alex
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.