Commit graph

20 commits

Author SHA1 Message Date
Stefan Weil
64925f7522 Bug 14383: C4: Fix some typos (mostly in comments and documentation)
Most of them were found and fixed using codespell.
Fix also some related grammar issues.

In C4/Serials.pm a variable was renamed to make future codespelling
checks easier.

Signed-off-by: Stefan Weil <sw@weilnetz.de>

http://bugs.koha-community.org/show_bug.cgi?id=14383
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2015-06-22 17:34:45 -03:00
Colin Campbell
d85f757ce7 Bug 7904 Change SIP modules to use standard LIB path
For historical reasons the SIPServer and SIP modules
have used an extra module path in addition to the
standard Koha one. This has caused numerous irritants
in attempting to set up scripts and basic tests. It
does not help in attempting to modify or debug
this code

This patch changes the package value in the modules
under the C4/SIP directory and makes calls to
them use the full package name.

Where the export mechanism was being short circuited
routines have been explicitly exported and imported
declarations of 'use ILS' when that module was
not being used and which only generated warnings
have been removed.

As a lot of the changes affect lines where
an object is instantiated with new. The opportunity
has been taken to replace the ambiguous indirect
syntax with the preferred direct call

In intializing ILS the full path is added as this
will not require any changes to existing configs.
I suspect this feature is unused, and adds
obfuscation rather than flexibility but have kept
the feature as we need this change in order to
rationalize and extend the testing of the server.

The visible difference is that with the normal Koha
PERL5LIB setting. Compilation of Modules under C4/SIP
should be successful and not fail with unlocated modules,
allowing developers to see any perl warnings

All the SIP modules can now be run through the tests
in t/00-load.t now except for SIPServer itself

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-05 14:44:54 -03:00
c95a4b0f84 Bug 12571 - Add ability to customize SIP2 screen messages
We should add the ability to apply a regular expression to screen
messages for the SIP2 server. This would allow libraries to not only
customize the screen messages the patron sees, but can also allow screen
messages to be translated.

Test Plan:
1) Apply this patch
2) Inspect etc/SIPconfig.xml, note the new screen_msg_regex tags
   that can be nested inside a given login tag.
3) Add one or more screen_msg_regex tags to your own SIP config
   Recommendation: s/Greetings from Koha./Welcome to your library!/g
4) Restart your SIP2 server
5) Test with a SIP2 machine, or use /misc/sip_cli_emulator.pl
6) Note your new AF fields!

Signed-off-by: Jason Burds <jburds@dubuque.lib.ia.us>

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-10-28 09:26:47 -03:00
Adrien Saurat
4a72f6b237 Bug 9865: make SIP msg encoding configurable via SIPconfig.xml
The accounts->login tag in SIPconfig.xml can now accept a new
parameter, "encoding". It will be mostly used to encode to utf8.

For this, simply add the parameter: encoding="utf8"

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Works as advertised, does nothing if encoding is not set.
Blows up all the machines that can't handled utf8 if it is set :) But
that's not Koha's fault. :)

Patch rebased by Christophe Croullebois  <christophe.croullebois@biblibre.com>

Signed-off-by: Petter Goksoyr Asen <boutrosboutrosboutros@gmail.com>

But now I did it the right way! And I can confirm that this patch solves
all issues with mangled characters in SIP messages. Confirmed that it
looks good with Norwegian characters in patron name and in book titles.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-30 16:33:52 +00:00
90e2aafeb5 Bug 9531: Make SIP2 message terminator configurable via SIPconfig.xml
Add a terminator option to SIPConfig.xml, choices for 'terminator' are
'CR' or 'CRLF'.  The default continues to be 'CRLF' if 'terminator' is
undefined.

Test Plan:
1) Apply patch
2) Start SIP server
3) Run C4/SIP/t/04patron_status.t
4) Stop SIP server
5) Add terminator="CR" for account login 'term1'
6) Run 04patron_status.t again, you should see no change

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Adrien Saurat <adrien.saurat@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-08 05:44:09 +00:00
Colin Campbell
7e7b3731dc Bug 8433 Remove unused 'use English'
Adding a use English to mosules which dont may
waste a few CPU cycles and bytes of storage
but doesnt add anything to the sum of human happiness

Remove unnecessary use English's
Removed already commented out but equally unnrcessary
use Exporter in same modules

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-01-13 08:42:50 -05:00
Marc Balmer
078ce11e11 Bug 7787: Make the SIP server much more robust.
Be liberal in what we accept, but strict in what we send:
Never exit the server process, but send a SC_RESEND message (96)
to the client if we received anything we don't understand.
 This is consistent with SIP server implementations of other ILSs.

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-06 15:37:37 +02:00
Colin Campbell
da49eeb8f9 Bug 7619 Use CRLF as default terminator
Most units require or tolerate CRLF as the terminator
Using only \r causes many including 3M units to signal errors
due to delay this resets CRLF to be default but adds a single
constant variable and explanation so that if you have a
"strictly conforming" unit (the 'Baby' is the only I have encountered
you know where to make the change

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-07-06 11:15:05 +02:00
Chris Cormack
509d673f10 Bug 7941 : Fix version numbers in modules
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-11 17:29:38 +02:00
Colin Campbell
3b5ac7543a Bug 5549 : Let Timestamp do the right thing if passed a DateTime 2012-03-20 13:20:54 +13:00
Colin Campbell
f9ccfae400 Bug 6620 Ensure autoflush is set on output filehandles
stdout is by default buffered and a flush is only guaranteed on CR
Sip responses are not CR terminated so we need to ensure autoflush
is switched on  so that the filehandle is flushed after a print
Otherwise this can manifest as self checks running slow or
failing due to timeout (although in the log we see the response)

Signed-off-by: Ulrich Kleiber <ulrich.kleiber@bsz-bw.de>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-09-14 21:40:45 +12:00
Chris Cormack
93ffca4eef Merge remote branch 'kc/new/bug_5586' into kcmaster 2011-01-24 07:21:47 +13:00
Colin Campbell
d4842d4560 Bug 5601 Fix processing of DueDate return
item duedate is not a datetime entity but a string retrieved
direct from the db that only needs restructuring
checkout was doing so but item_info was pretending it was in secs
(actually Item.pm manipulated then overwrote it!!)
assume the date in the db is correct (otherwise madness ensues)
dont try to second guess it
As duedates do not yet include a time element assume end of day
as a safety first

[F. Demians] I confirm Joe Atzberger diagnostic. That's a bug reported by a
library. I've tested Colin Campell solution. It fixes the bug.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-12 19:30:25 +13:00
Joe Atzberger
3480ae1cac Bug 5586: Set SIP line-endings to proper SPEC-compliant \r
Line-endings have been a longstanding problem because
of variations in implementations.  But we should still try
to default to the correct thing.

This harmonizes part of Koha's SIP code with the current
SIPServer version, used in common with Evergreen.  Repo at:
    https://github.com/atz/SIPServer

Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-01-07 10:05:11 +13:00
Colin Campbell
590514ca12 Bug 4364 - SIP Checkout dates incorrect
Change timestamp routine to do the right thing when passed an iso date
Otherwise was generating an epoch date of 0

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 06:56:27 -04:00
Colin Campbell
f7f3dadd2e Bug 2653 Protect against sending End of Message in Text
Remove any carriage returns in text data as they will be
interpreted as end of message by clients and cause communication failure

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-04-07 06:54:18 -04:00
Joe Atzberger (siptest
5aecb46ad0 SIP - Lots of regexp hacking of input streams and verbose debugging feedback.
The basic problem is that the SIP logic doesn't know where the
input is coming from.  It might be a RAW socket, and it might
be telnet.  If it is telnet, although the specs declare a
character set (from MS, unfortunately), they do not specify a telnet
implementation.  So you might get telnet handshaking or
renegotiations in the middle of an otherwise peaceful session and
these should not be taken as SIP commands.  Patches include a move
towards using $CRLF from Socket to avoid problems w/ foreign platform
mapping \n and \r to \015 or \012.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-20 06:12:42 -05:00
Joe Atzberger (siptest
910e13c4ad Add debugging around readline.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-06-05 22:43:39 -05:00
Joe Atzberger
199daed4ed Sip.pm - BEGIN block VERSION and vars related to export.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-07 20:02:43 -06:00
Ryan Higgins
7b9b36bd2e adding openncip / opensip SIP2 service
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-06 06:32:53 -06:00