Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ OBJS=$(SRCS:.cpp=.o)
TARGET=libi2psam.a

$(TARGET): $(OBJS)
$(AR) $(ARFLAGS) $(TARGET) $(OBJS)
$(AR) $(ARFLAGS) $(TARGET) $(OBJS)

LOADLIBES=-L./ -li2psam

eepget: eepget.cpp $(TARGET)

clean:
$(RM) $(TARGET) $(OBJS) eepget
$(RM) $(TARGET) $(OBJS) eepget
5 changes: 5 additions & 0 deletions eepget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ int main(int argc, char **argv)
auto lookupResult = s.namingLookup(target);
auto connResult = s.connect(lookupResult.value, false);
auto conn = connResult.value.get();
if (conn == nullptr)
{
std::cerr << "Check your SAM port" << std::endl;
return 1;
}
conn->write("GET / HTTP/1.1\r\n\r\n");
auto reply = conn->read();

Expand Down