https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43848

--- Comment #1 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 208470
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208470&action=edit
Bug 43848: Make request parsing and session setup reusable in the SIP server

Code outside the SIP server that needs to parse a request or build a server
context the way the server does ( the SIP2 message tester of bug 42769 is the
first ) has to copy it, because both are buried in functions that also do
something else, answering a request and authenticating a terminal. Pull them
out:

- parse_message: the part of handle() that sets the field delimiter, checks
  and removes the error detection suffix and splits the message into fixed
  and variable length fields. handle() calls it and answers a bad checksum
  as before, a caller that only wants the parsed message can get it without
  anything being printed.
- build_session: what login_core does once a terminal has authenticated
  ( account, institution, policy and the ILS connection ). login_core calls
  it, nothing changes for a real login.

MsgType called ->use on the ILS module without loading UNIVERSAL::require,
which it only got away with because the SIP server loads it elsewhere. Load
it, as a caller that uses MsgType on its own would otherwise fail.

No change in behaviour for the SIP server.

To test:
1) prove t/db_dependent/SIP/ t/SIP/

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to