Skip to content

Commit 2cab1cf

Browse files
authored
Merge pull request #181 from infoforcefeed/ol_database-field-buffer-length-fix
fixes both the liboleg and frontend builds
2 parents 39e9ffd + 72915f0 commit 2cab1cf

File tree

14 files changed

+48
-36
lines changed

14 files changed

+48
-36
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
*.swo
22
*.swp
3-
olegdb
43
*.o
54
*.dump
65
data

.travis.yml

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1-
language: c
2-
compiler:
3-
- gcc
4-
- clang
5-
script:
6-
- make liboleg oleg_test
7-
- sudo make install
8-
- export LD_LIBRARY_PATH=./build/lib:$LD_LIBRARY_PATH
9-
- ./build/bin/oleg_test
10-
- LD_LIBRARY_PATH=./build/lib:/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH go test ./...
11-
before_install:
12-
- sudo apt-get update
13-
- sudo apt-get install golang
1+
dist: bionic
2+
language: go
3+
go:
4+
- 1.14.x
5+
146
notifications:
15-
email:
16-
on_success: never
17-
on_failure: change
18-
recipients:
19-
- "qpfiffer@gmail.com"
7+
email:
8+
on_success: change
9+
on_failure: change
10+
recipients:
11+
- "qpfiffer@gmail.com"
12+
- "kyle@kyleterry.com"
13+
14+
jobs:
15+
include:
16+
- stage: test
17+
script:
18+
- make liboleg oleg_test test
19+
- name: build
20+
script:
21+
- mkdir -p build
22+
- sudo make libinstall
23+
- go test ./...
24+
- make olegdb
25+
2026
env:
2127
global:
2228
- secure: "GbSMNCqnGnjiuDqJJ55/EaNifx9L7t6JQVPw6illEnGZXL3T5RiC7alrpOQl2qGJG/gwRudMpFmEyvEqs0Rlpgx3x1DvcLCMlC2Rjd/2YklD0KVW0D91Mrrkk7ERzQTO8MXB2AUTxjSAwsZtewybebQhoqr7frulM4TclDZ/Cq4="

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ uninstall:
6969

7070
olegdb: liboleg $(LIB_OUT) $(BIN_DIR) $(BIN_OUT)
7171
$(BIN_OUT):
72-
go build -o $(BIN_OUT) ./frontend/
72+
go build -o $(BIN_OUT) ./cmd/olegdb
7373

7474
install: goinstall
7575

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Dependencies
2424
============
2525

2626
* A healthy fear of the end
27-
* Go (>= 1.1)
27+
* Go (>= 1.14)
2828

2929
Installation
3030
============
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package main
22

33
import (
4-
"./goleg"
54
"io/ioutil"
65
"net/http"
76
"strings"
7+
8+
"github.com/infoforcefeed/olegdb/pkg/goleg"
89
)
910

1011
type Operation struct {

frontend/main.go renamed to cmd/olegdb/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"./goleg"
54
"encoding/json"
65
"flag"
76
"fmt"
@@ -10,6 +9,8 @@ import (
109
"net/http"
1110
"os"
1211
"os/signal"
12+
13+
"github.com/infoforcefeed/olegdb/pkg/goleg"
1314
)
1415

1516
type Config struct {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const (
2323
OpCursorPrev = "._prev"
2424
OpPrefixMatch = "._match"
2525
OpBulkUnjar = "_bulk_unjar"
26-
OpSquish = "_squish"
26+
OpSquish = "_squish"
2727
)
2828

2929
func httpGet(w http.ResponseWriter, op Operation) *HTTPError {

go.mod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module github.com/infoforcefeed/olegdb
2+
3+
go 1.14

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github.com/infoforcefeed/olegdb v0.0.0-20190920231543-39e9ffd04c30 h1:O+Siihon2HK9O8K3siG/42HU2UvnxCu69mq3ktlIQCQ=
2+
github.com/infoforcefeed/olegdb v0.0.0-20190920231543-39e9ffd04c30/go.mod h1:H5+5XDNE+DncxwND9HIRshDQ5JP8rkoHkNBkbpDD/GM=

include/oleg.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ typedef struct ol_database {
126126
void (*enable)(int, int*);
127127
void (*disable)(int, int*);
128128
bool (*is_enabled)(const int, const int*);
129-
char name[DB_NAME_SIZE];
130-
char path[PATH_LENGTH];
131-
char aol_file[AOL_FILENAME_ALLOC];
129+
char name[DB_NAME_SIZE+1];
130+
char path[PATH_LENGTH+1];
131+
char aol_file[AOL_FILENAME_ALLOC+1];
132132
FILE *aolfd;
133133
int feature_set;
134134
short int state;

0 commit comments

Comments
 (0)