Permalink
Browse files

made unbind a generic function

  • Loading branch information...
1 parent d2a523b commit 269a23b96903542802539984ac6bcdd96a828296 Phil Bayfield committed May 4, 2010
Showing with 5 additions and 0 deletions.
  1. +5 −0 smpp.go
View
@@ -120,6 +120,11 @@ func (smpp *smpp) bind(cmd, rcmd SMPPCommand, params []interface{}) (err os.Erro
// Send unbind request
func (smpp *smpp) Unbind() (err os.Error) {
+ // Check connected and bound
+ if !smpp.connected || !smpp.bound {
+ err = os.NewError("Unbind: A bound connection is required to unbind")
+ return
+ }
// Increment sequence number
smpp.sequence ++
// Create bind PDU

0 comments on commit 269a23b

Please sign in to comment.