Skip to content
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