Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
interkosmos committed Jul 8, 2024
1 parent 012d53f commit 5e18178
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
16 changes: 8 additions & 8 deletions adoc/dmlogger.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ If a minimum log level is selected, only logs of a level greater equal the
minimum are stored in the database. Log messages with lower level are
discarded.

The IPC option enabled process synchronisation via POSIX semaphores. The
semaphore value is incremented from 0 to 1 whenever a new log was received. The
name of the semaphore equals the *dmlogger* name with leading `/`. Only a
single process shall wait for the semaphore unless round-robin IPC is desired.
This option may be used to synchronise incoming log messages automatically with
a remote RPC API server. For example, pass the *dmlogger* name through
command-line argument `--wait` to _dmsync(1)_. The log synchronisation is be
trigged by incoming logs.
The option `--ipc` enables process synchronisation via POSIX semaphores. The
semaphore value is incremented from 0 to 1 whenever a new log has been
delivered. The name of the semaphore equals the *dmlogger* name with leading
`/`. Only a single process shall wait for the semaphore unless round-robin IPC
is desired. This option may be used to synchronise incoming log messages
automatically with a remote RPC API server. For example, pass the *dmlogger*
name to _dmsync(1)_ through command-line argument `--wait`. The semaphore will
then trigger the log synchronisation.

== OPTIONS

Expand Down
20 changes: 10 additions & 10 deletions man/dmlogger.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: dmlogger
.\" Author: Philipp Engel
.\" Generator: Asciidoctor 2.0.23
.\" Date: 2024-04-23
.\" Date: 2024-07-08
.\" Manual: User Commands
.\" Source: DMLOGGER
.\" Language: English
.\"
.TH "DMLOGGER" "1" "2024-04-23" "DMLOGGER" "User Commands"
.TH "DMLOGGER" "1" "2024-07-08" "DMLOGGER" "User Commands"
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.ss \n[.ss] 0
Expand Down Expand Up @@ -49,14 +49,14 @@ If a minimum log level is selected, only logs of a level greater equal the
minimum are stored in the database. Log messages with lower level are
discarded.
.sp
The IPC option enabled process synchronisation via POSIX semaphores. The
semaphore value is incremented from 0 to 1 whenever a new log was received. The
name of the semaphore equals the \fBdmlogger\fP name with leading \f(CR/\fP. Only a
single process shall wait for the semaphore unless round\-robin IPC is desired.
This option may be used to synchronise incoming log messages automatically with
a remote RPC API server. For example, pass the \fBdmlogger\fP name through
command\-line argument \f(CR\-\-wait\fP to \fIdmsync(1)\fP. The log synchronisation is be
trigged by incoming logs.
The option \f(CR\-\-ipc\fP enables process synchronisation via POSIX semaphores. The
semaphore value is incremented from 0 to 1 whenever a new log has been
delivered. The name of the semaphore equals the \fBdmlogger\fP name with leading
\f(CR/\fP. Only a single process shall wait for the semaphore unless round\-robin IPC
is desired. This option may be used to synchronise incoming log messages
automatically with a remote RPC API server. For example, pass the \fBdmlogger\fP
name to \fIdmsync(1)\fP through command\-line argument \f(CR\-\-wait\fP. The semaphore will
then trigger the log synchronisation.
.SH "OPTIONS"
.sp
\fB\-\-config\fP, \fB\-c\fP \fIfile\fP
Expand Down
6 changes: 5 additions & 1 deletion src/dm_geocom_type.f90
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,17 @@ integer function dm_geocom_type_validated(type, value, default, verbose, error)
integer, intent(out), optional :: error !! Error code.

integer :: rc, value_
logical :: verbose_

rc = E_INVALID
n = 0

value_ = -1
if (present(value)) value_ = value

verbose_ = .false.
if (present(verbose)) verbose_ = verbose

select case (type)
case (GEOCOM_AUT_ADJMODE)
select case (value_)
Expand Down Expand Up @@ -688,7 +692,7 @@ integer function dm_geocom_type_validated(type, value, default, verbose, error)
if (dm_is_error(rc) .and. present(default)) n = default
if (present(error)) error = rc

if (.not. present(verbose)) return
if (.not. verbose_) return
if (.not. dm_is_error(rc)) return

if (type >= 1 .and. type <= GEOCOM_TYPE_LAST) then
Expand Down

0 comments on commit 5e18178

Please sign in to comment.