admin/operations: fix and improve requeueing #29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using a filename which cannot be interpreted as integer value in decimal notation without any leading zeros does not work[1]. The only id which can be used save seems to be
0
, other values can be overwritten due to [2] and the implementation ofmessage_enqueue_retrieve_max_ID
[3] which is not free of race conditions. So better be save than sorry.[1] grommunio/gromox#135
[2] grommunio/gromox#136
[3] https://github.com/grommunio/gromox/blob/17ca866e731a3c19a6e66491442dd68a72b0ad39/mda/message_enqueue.cpp#L328
The code has been improved:
mv -n
to never replace existing filessave/
is empty