From 75ecdeb635a0c695da768ad3c879d57e42885326 Mon Sep 17 00:00:00 2001 From: nezbednik Date: Thu, 20 Jul 2023 21:10:01 +0200 Subject: [PATCH] Add sandia library --- .gitmodules | 3 +++ Makefile | 2 +- source/main.c | 9 ++++++++- source/sandia | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .gitmodules create mode 160000 source/sandia diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..9f68363 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "source/sandia"] + path = source/sandia + url = https://git.donut.eu.org/nez/sandia-Wii.git diff --git a/Makefile b/Makefile index ad42dc9..47bc760 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ include $(DEVKITPPC)/wii_rules #--------------------------------------------------------------------------------- TARGET := $(notdir $(CURDIR)) BUILD := build -SOURCES := source +SOURCES := source source/sandia DATA := data INCLUDES := diff --git a/source/main.c b/source/main.c index 4208b0d..b5f50a0 100644 --- a/source/main.c +++ b/source/main.c @@ -4,6 +4,8 @@ #include #include +#include "sandia/sandia.h" + static void *xfb = NULL; static GXRModeObj *rmode = NULL; @@ -74,7 +76,12 @@ int main(int argc, char **argv) { logprint(1, "Initialized successfully!\n"); logprint(0, "Your Wii's IP address is "); printf("%s.\n", localip); - } else { + + sandia req = sandia_create("libreshop.donut.eu.org", 80); + sandia_response res = sandia_get_request(&req, "/"); + printf("\n%s\n", res.body); + sandia_close(&res); + } else { logprint(0, "Network configuration failed :(\n"); } diff --git a/source/sandia b/source/sandia new file mode 160000 index 0000000..9b383cd --- /dev/null +++ b/source/sandia @@ -0,0 +1 @@ +Subproject commit 9b383cdda825ab4ba2767102b06cbd5dc734dae9 -- 2.30.2