Skip to content

Commit

Permalink
agent: add license in files missing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
pritesh committed Sep 20, 2016
1 parent 2d4ed2d commit fe08223
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
15 changes: 15 additions & 0 deletions agent/handlers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
// Copyright (c) 2016 Pani Networks
// All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations
// under the License.

package agent

import (
Expand Down
2 changes: 1 addition & 1 deletion common/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (dbStore *DbStore) getConnString() string {
if info.Port == 0 {
portStr = ":3306"
}
// First construct the network part, to log it
// First construct the network part, to log it
connStr = fmt.Sprintf("@tcp(%s%s)/%s?parseTime=true", info.Host, portStr, info.Database)
log.Printf("DB: Connection string: ****:****%s", connStr)
// Now add credentials to connection string
Expand Down
4 changes: 2 additions & 2 deletions ipam/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ func (ipamStore *ipamStore) addEndpoint(endpoint *Endpoint, upToEndpointIpInt ui
// See if there is a formerly allocated IP already that has been released
// (marked "in_use")
sel = "MIN(network_id), ip"
log.Printf("IpamStore: Calling SELECT %s FROM endpoints WHERE %s;", sel, fmt.Sprintf(strings.Replace(filter + "AND in_use = 0", "?", "%s", 3), hostId, tenantId, segId))
row = tx.Model(Endpoint{}).Where(filter + "AND in_use = 0", hostId, tenantId, segId).Select(sel).Row()
log.Printf("IpamStore: Calling SELECT %s FROM endpoints WHERE %s;", sel, fmt.Sprintf(strings.Replace(filter+"AND in_use = 0", "?", "%s", 3), hostId, tenantId, segId))
row = tx.Model(Endpoint{}).Where(filter+"AND in_use = 0", hostId, tenantId, segId).Select(sel).Row()
err = common.GetDbErrors(tx)
if err != nil {
log.Printf("Errors: %v", err)
Expand Down

0 comments on commit fe08223

Please sign in to comment.