Ticket #53 (closed defect: fixed)

Opened 22 months ago

Last modified 21 months ago

Remove needless NULL checks from the PostgreSQL modules

Reported by: smoku Owned by: smoku
Priority: major Component: storage
Version: 2.1 Keywords:
Cc: Tracforge_linkmap:
Blocking: Blocked By:

Description

The PostgreSQL modules (c2s/authreg_pgsql.c and sm/storage_pgsql.c) contain checks to make sure that neither of the configuration parameters host, port, dbname, user, and pass are NULL meaning they have not been set in the configuration file.

This is not needed, as PQsetdbLogin() allows all these values to be NULL and uses sensible defaults in that case. Especially annoying is the check for "host == NULL", because the hostname parameter actually needs to be NULL to connect to the database server through unix domain sockets, and hence the NULL check forces one to set up PostgreSQL so that it listens on a TCP socket.

Attachments

jabberd-pgsql.patch (1.4 KB) - added by smoku 22 months ago.
Patch by Reinhard Max <max@…>

Change History

Changed 22 months ago by smoku

Patch by Reinhard Max <max@…>

Changed 21 months ago by smoku

  • status changed from new to closed
  • resolution set to fixed

(In [157]) Integrated patch to allow setting PgSQL parameters to NULL by Reinhard Max. Closes #53

Note: See TracTickets for help on using tickets.