Bugzilla – Attachment 9002 Details for
Bug 6335
Branch not set consistently in all SIP transactions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 6335 Set branch in sip session
Bug-6335-Set-branch-in-sip-session.patch (text/plain), 2.12 KB, created by
Chris Cormack
on 2012-04-07 10:40:03 UTC
(
hide
)
Description:
Bug 6335 Set branch in sip session
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2012-04-07 10:40:03 UTC
Size:
2.12 KB
patch
obsolete
>From 98fa4ad6d284d56e6a80b2780bfbe9ec6a2da24e Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 2 Jun 2011 12:26:09 +0100 >Subject: [PATCH] Bug 6335 Set branch in sip session > >The server returns its branch as the institution in the config file >However in transactions it will default to the homebranch of the >sip user which may not be consistent with that. Needs to set branch >in the session if there is a value in config otherwise statistics and >behaviour can be wrong (esp in discharge) > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/SIP/Sip/MsgType.pm | 24 ++++++++++++------------ > 1 files changed, 12 insertions(+), 12 deletions(-) > >diff --git a/C4/SIP/Sip/MsgType.pm b/C4/SIP/Sip/MsgType.pm >index 6a11d0e..00164a4 100644 >--- a/C4/SIP/Sip/MsgType.pm >+++ b/C4/SIP/Sip/MsgType.pm >@@ -817,7 +817,7 @@ sub login_core ($$$) { > $server->{sip_username} = $uid; > $server->{sip_password} = $pwd; > >- my $auth_status = api_auth($uid,$pwd); >+ my $auth_status = api_auth($uid,$pwd,$inst); > if (!$auth_status or $auth_status !~ /^ok$/i) { > syslog("LOG_WARNING", "api_auth failed for SIP terminal '%s' of '%s': %s", > $uid, $inst, ($auth_status||'unknown')); >@@ -1585,17 +1585,17 @@ sub patron_status_string { > return $patron_status; > } > >-sub api_auth($$) { >- # AUTH >- my ($username,$password) = (shift,shift); >- $ENV{REMOTE_USER} = $username; >- my $query = CGI->new(); >- $query->param(userid => $username); >- $query->param(password => $password); >- my ($status, $cookie, $sessionID) = check_api_auth($query, {circulate=>1}, "intranet"); >- # print STDERR "check_api_auth returns " . ($status || 'undef') . "\n"; >- # print "api_auth userenv = " . &dump_userenv; >- return $status; >+sub api_auth { >+ my ($username,$password, $branch) = @_; >+ $ENV{REMOTE_USER} = $username; >+ my $query = CGI->new(); >+ $query->param(userid => $username); >+ $query->param(password => $password); >+ if ($branch) { >+ $query->param(branch => $branch); >+ } >+ my ($status, $cookie, $sessionID) = check_api_auth($query, {circulate=>1}, 'intranet'); >+ return $status; > } > > 1; >-- >1.7.5.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6335
:
4339
| 9002