@@ -172,9 +172,9 @@ func (rsmq *RedisSMQ) getQueue(qname string, uid bool) (*queueDef, error) {
172172 return nil , ErrQueueNotFound
173173 }
174174
175- vt := convertToUnsigned [uint ](hmGetValues [0 ])
176- delay := convertToUnsigned [uint ](hmGetValues [1 ])
177- maxsize := convertToSigned [int ](hmGetValues [2 ])
175+ vt := convertStringToUint [uint ](hmGetValues [0 ])
176+ delay := convertStringToUint [uint ](hmGetValues [1 ])
177+ maxsize := convertStringToInt [int ](hmGetValues [2 ])
178178
179179 t := timeCmd .Val ()
180180
@@ -221,13 +221,13 @@ func (rsmq *RedisSMQ) GetQueueAttributes(qname string) (*QueueAttributes, error)
221221
222222 hmGetValues := hmGetSliceCmd .Val ()
223223
224- vt := convertToUnsigned [uint ](hmGetValues [0 ])
225- delay := convertToUnsigned [uint ](hmGetValues [1 ])
226- maxsize := convertToSigned [int ](hmGetValues [2 ])
227- totalRecv := convertStringToUnsigned [uint64 ](hmGetValues [3 ], 0 )
228- totalSent := convertStringToUnsigned [uint64 ](hmGetValues [4 ], 0 )
229- created := convertToUnsigned [uint64 ](hmGetValues [5 ])
230- modified := convertToUnsigned [uint64 ](hmGetValues [6 ])
224+ vt := convertStringToUint [uint ](hmGetValues [0 ])
225+ delay := convertStringToUint [uint ](hmGetValues [1 ])
226+ maxsize := convertStringToInt [int ](hmGetValues [2 ])
227+ totalRecv := convertStringToUnsignedOrDefault [uint64 ](hmGetValues [3 ], 0 )
228+ totalSent := convertStringToUnsignedOrDefault [uint64 ](hmGetValues [4 ], 0 )
229+ created := convertStringToUint [uint64 ](hmGetValues [5 ])
230+ modified := convertStringToUint [uint64 ](hmGetValues [6 ])
231231
232232 msgs := uint64 (zCardIntCmd .Val ())
233233 hiddenMsgs := uint64 (zCountIntCmd .Val ())
@@ -420,8 +420,8 @@ func (rsmq *RedisSMQ) createQueueMessage(cmd *redis.Cmd) (*QueueMessage, error)
420420 }
421421 id := vals [0 ].(string )
422422 message := vals [1 ].(string )
423- rc := convertToUnsigned [ uint64 ] (vals [2 ])
424- fr := convertToSigned [int64 ](vals [3 ])
423+ rc := convertIntToUint (vals [2 ])
424+ fr := convertStringToInt [int64 ](vals [3 ])
425425 sent , err := strconv .ParseInt (id [0 :10 ], 36 , 64 )
426426 if err != nil {
427427 panic (err )
0 commit comments