Skip to content

Commit c9551a9

Browse files
authored
Merge pull request #38 from tknie/main
Synchronize call with on Adabas ID
2 parents 84ebad7 + 1aa8322 commit c9551a9

File tree

7 files changed

+12
-4
lines changed

7 files changed

+12
-4
lines changed

adabas/adabas_message_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func TestAdabasMessageTranslate(t *testing.T) {
101101
ada.Acbx.Acbxrsp = AdaNormal
102102
assert.Equal(t, "Erfolgreich beendet (rsp=0,subrsp=0,dbid=21,file=0)", NewError(ada).Translate("de"))
103103
ada.Acbx.Acbxrsp = AdaInvalidFileNumber
104-
assert.Equal(t, "Falscher oder nicht authorizierte File-Nummer (rsp=17,subrsp=0,dbid=21,file=0)", NewError(ada).Translate("de"))
104+
assert.Equal(t, "Falsche oder nicht authorizierte File-Nummer (rsp=17,subrsp=0,dbid=21,file=0)", NewError(ada).Translate("de"))
105105
ada.Acbx.Acbxerrc = AdaISNNotSorted
106106
assert.Equal(t, "The program tried to access system file 1 or 2, and no OP command was issued. (rsp=17,subrsp=1,dbid=21,file=0)", NewError(ada).Translate("de"))
107107
ada.Acbx.Acbxrsp = 120

adabas/adabasstructure.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ package adabas
2222
import (
2323
"bytes"
2424
"fmt"
25+
"sync"
2526
"sync/atomic"
2627
"time"
2728
"unsafe"
@@ -167,6 +168,7 @@ type Status struct {
167168
platform *adatypes.Platform
168169
adabas *Adabas
169170
version string
171+
lock sync.Mutex
170172
}
171173

172174
// ID Adabas Id

adabas/call.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ func NewAdabasID() *ID {
6969
// AdabasClient library support
7070
func (adabas *Adabas) CallAdabas() (err error) {
7171
defer TimeTrack(time.Now(), "Call adabas", adabas)
72+
s := adabas.status
73+
s.lock.Lock()
74+
defer s.lock.Unlock()
7275

7376
if adatypes.Central.IsDebugLevel() {
7477
adatypes.Central.Log.Debugf("Send calling CC %c%c adabasp=%p URL=%s Adabas ID=%v",

adabas/rcall.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ func NewAdabasID() *ID {
6969
// AdabasClient library support
7070
func (adabas *Adabas) CallAdabas() (err error) {
7171
defer TimeTrack(time.Now(), "RCall adabas", adabas)
72+
s := adabas.status
73+
s.lock.Lock()
74+
defer s.lock.Unlock()
7275

7376
if adatypes.Central.IsDebugLevel() {
7477
adatypes.Central.Log.Debugf("Call Adabas (local disabled) adabasp=%p %s%v", adabas, adabas.URL.String(), adabas.ID.String())

adatypes/common_type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
)
2525

2626
// Version version of current build
27-
var Version = "v1.6.15"
27+
var Version = "v1.6.16"
2828

2929
// FieldType indicate a field type of the field
3030
type FieldType uint

adatypes/static_messages.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ var staticMessages = []struct {
131131
{"ADAGE0F080", "de", "Reptor: Conversion to Open Systems FDT failed"},
132132
{"ADAGE0F081", "de", "Reptor: Converted FDT exceeds buffer"},
133133
{"ADAGE10000", "de", "Ein Teilkommand des MC Kommandos ist fehl geschlagen"},
134-
{"ADAGE11000", "de", "Falscher oder nicht authorizierte File-Nummer"},
134+
{"ADAGE11000", "de", "Falsche oder nicht authorizierte File-Nummer"},
135135
{"ADAGE11001", "de", "The program tried to access system file 1 or 2, and no OP command was issued."},
136136
{"ADAGE11002", "de", "The program tried to access system file 1 or 2, and the user is not authorized."},
137137
{"ADAGE11004", "de", "One of the following occurred:- The specified file number is invalid. The file number might be equal to '0' or greater than the maximum allowed. When running with ADARUN DTP={RM | TM}, an attempt was made by a non-Adabas Transaction Manager user to access/update an Adabas Transaction Manager system file."},

messages/adabas.de

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ ADAGE0F07F=Reptor: No preceding Create FDT for Create Table
9999
ADAGE0F080=Reptor: Conversion to Open Systems FDT failed
100100
ADAGE0F081=Reptor: Converted FDT exceeds buffer
101101
ADAGE10000=Ein Teilkommand des MC Kommandos ist fehl geschlagen
102-
ADAGE11000=Falscher oder nicht authorizierte File-Nummer
102+
ADAGE11000=Falsche oder nicht authorizierte File-Nummer
103103
ADAGE11001=The program tried to access system file 1 or 2, and no OP command was issued.
104104
ADAGE11002=The program tried to access system file 1 or 2, and the user is not authorized.
105105
ADAGE11004=One of the following occurred:- The specified file number is invalid. The file number might be equal to "0" or greater than the maximum allowed. When running with ADARUN DTP={RM | TM}, an attempt was made by a non-Adabas Transaction Manager user to access/update an Adabas Transaction Manager system file.

0 commit comments

Comments
 (0)