Skip to content

Commit

Permalink
closes #3: don't use shutdown() on the socket
Browse files Browse the repository at this point in the history
  • Loading branch information
classilla committed Aug 24, 2018
1 parent 0ebe04c commit c6d7609
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.9.1.0</string>
<string>0.9.2.0</string>
<key>CFBundleVersion</key>
<string>901.0.0</string>
<string>902.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.9</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Makefile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ WHERE=$(WHEREDIR)/Onyx.app/Contents
# This Makefile requires Makefile.generic to have already run, since it
# just packages that binary.

Onyx.dmg: onyx
Onyx.dmg: onyx clean
$(MKDIR) -p $(WHERE)/MacOS
$(CP) Info.plist $(WHERE)
$(CP) mac-onyx-inst $(WHERE)/MacOS/onyx-inst
Expand Down
5 changes: 3 additions & 2 deletions onyx.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#ifdef _WIN32
#include "winsock2.h"
#define SHUT_WR SD_SEND
#define SHUT_RD SD_RECEIVE
#else
#include <sys/socket.h>
#include <netinet/in.h>
Expand Down Expand Up @@ -85,7 +86,8 @@ int main(int argc, char **argv) {
char buf[BUFFER_SIZE];
char ebuf[BUFFER_SIZE + BUFFER_SIZE + 1];
char *in, *val, *host, *sel;
uint32_t plength, bread, port, seq, itype, hlength, i, j, k, ln, hn;
uint32_t plength, bread, port, seq, itype, hlength, i, j, ln, hn;
int32_t k;
int sockfd, sent, sent_b;
struct sockaddr_in addr;
struct hostent *server;
Expand Down Expand Up @@ -428,7 +430,6 @@ int main(int argc, char **argv) {
// Receive data until the socket closes or times out.
// Any activity on stdin cancels the transmission.
// We can free everything now, we don't need it anymore.
shutdown(sockfd, SHUT_WR);
free(sel);

for(;;) {
Expand Down
4 changes: 2 additions & 2 deletions onyx.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Name "OverbiteNX Onyx Component"
OutFile "onyxinst.exe"
InstallDir "$LOCALAPPDATA\OverbiteNX"

VIProductVersion "0.9.1.0"
VIAddVersionKey "FileVersion" "0.9.1.0"
VIProductVersion "0.9.2.0"
VIAddVersionKey "FileVersion" "0.9.2.0"
VIAddVersionKey "ProductName" "OverbiteNX Onyx Component Installer"
VIAddVersionKey "CompanyName" "The Overbite Project"
VIAddVersionKey "LegalCopyright" "© 2018 Cameron Kaiser"
Expand Down

0 comments on commit c6d7609

Please sign in to comment.