Skip to content

Commit 5adb005

Browse files
committed
permit any object type for callback correlators
1 parent 888f08c commit 5adb005

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

ibmmq/mqiCBC.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ for the hObj
3636
*/
3737
type MQCBC struct {
3838
CallType int32
39-
CallbackArea []byte // These byte arrays are saved/restored in parent function
40-
ConnectionArea []byte
39+
CallbackArea interface{} // These fields are saved/restored in parent function
40+
ConnectionArea interface{}
4141
State int32
4242
DataLength int32
4343
BufferLength int32

ibmmq/mqiCBD.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ MQCBD is a structure containing the MQ Callback Descriptor
3434
type MQCBD struct {
3535
CallbackType int32
3636
Options int32
37-
CallbackArea []byte
37+
CallbackArea interface{}
3838
CallbackFunction MQCB_FUNCTION
3939
CallbackName string
4040
MaxMsgLength int32

ibmmq/mqiCTLO.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import "C"
3232
MQCTLO is a structure containing the MQ Control Options
3333
*/
3434
type MQCTLO struct {
35-
ConnectionArea []byte
35+
ConnectionArea interface{}
3636
Options int32
3737
}
3838

ibmmq/mqicb.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ type MQCB_FUNCTION func(*MQObject, *MQMD, *MQGMO, []byte, *MQCBC, *MQReturn)
4646
type cbInfo struct {
4747
hObj *MQObject
4848
callbackFunction MQCB_FUNCTION
49-
callbackArea []byte
50-
connectionArea []byte
49+
callbackArea interface{}
50+
connectionArea interface{}
5151
}
5252

5353
// This map is indexed by a combination of the hConn and hObj values

samples/amqscb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ func mainWithRc() int {
153153
// Keep the program running until the callback has indicated there are no
154154
// more messages.
155155
d, _ := time.ParseDuration("5s")
156-
for ok {
156+
for ok && err == nil {
157157
time.Sleep(d)
158158
}
159159

0 commit comments

Comments
 (0)