Skip to content

Commit

Permalink
fixing client/server examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroszan committed Oct 1, 2016
1 parent e1de3ca commit fae28af
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions examples/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ func main() {
EnableWatchdog: true,
WatchdogInterval: 5 * time.Second,
AcctApplicationID: []*diam.AVP{
// Advertise that we want support for both
// Accounting applications 4 and 999.
diam.NewAVP(avp.AcctApplicationID, avp.Mbit, 0, datatype.Unsigned32(4)), // RFC 4006
// Advertise that we want support accounting application with id 999
diam.NewAVP(avp.AcctApplicationID, avp.Mbit, 0, datatype.Unsigned32(helloApplication)),
},
AuthApplicationID: []*diam.AVP{
// Advertise support for credit control application
diam.NewAVP(avp.AuthApplicationID, avp.Mbit, 0, datatype.Unsigned32(4)), // RFC 4006
},
}

// Set message handlers.
Expand Down Expand Up @@ -281,7 +283,7 @@ const (
// helloDictionary is our custom, example dictionary.
var helloDictionary = xml.Header + `
<diameter>
<application id="999">
<application id="999" type="acct">
<command code="111" short="HM" name="Hello-Message">
<request>
<rule avp="Session-Id" required="true" max="1"/>
Expand Down
2 changes: 1 addition & 1 deletion examples/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func handleALL(c diam.Conn, m *diam.Message) {
// helloDictionary is our custom, example dictionary.
var helloDictionary = xml.Header + `
<diameter>
<application id="999">
<application id="999" type="acct">
<command code="111" short="HM" name="Hello-Message">
<request>
<rule avp="Session-Id" required="true" max="1"/>
Expand Down

0 comments on commit fae28af

Please sign in to comment.