Example #1
0
func (smg *SMGeneric) BiRPCV1ActiveSessions(clnt rpcclient.RpcClientConnection, attrs utils.AttrSMGGetActiveSessions, reply *[]*ActiveSession) error {
	aSessions, _, err := smg.ActiveSessions(attrs.AsMapStringString(), false)
	if err != nil {
		return utils.NewErrServerError(err)
	}
	*reply = aSessions
	return nil
}
Example #2
0
func (smg *SMGeneric) BiRPCV1ActiveSessionsCount(attrs utils.AttrSMGGetActiveSessions, reply *int) error {
	if _, count, err := smg.ActiveSessions(attrs.AsMapStringString(), true); err != nil {
		return err
	} else {
		*reply = count
	}
	return nil
}
Example #3
0
func (self *SMGenericV1) ActiveSessions(attrs utils.AttrSMGGetActiveSessions, reply *[]*sessionmanager.ActiveSession) error {
	aSessions, _, err := self.sm.ActiveSessions(attrs.AsMapStringString(), false)
	if err != nil {
		return utils.NewErrServerError(err)
	}
	*reply = aSessions
	return nil
}