Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 166030 Details for
Bug 238319
games-puzzle/tetrinet-0.11-r1 - quickpatchs / ebuild rewritten
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch allow to use non standart tetrinet ports
02_tetrinet-port.patch (text/plain), 1.67 KB, created by
Tiger
on 2008-09-21 20:27:12 UTC
(
hide
)
Description:
Patch allow to use non standart tetrinet ports
Filename:
MIME Type:
Creator:
Tiger
Created:
2008-09-21 20:27:12 UTC
Size:
1.67 KB
patch
obsolete
>--- tetrinet.c 2003-09-07 18:29:29.000000000 +0200 >+++ tetrinet.c 2008-09-18 22:33:01.000000000 +0200 >@@ -543,6 +543,7 @@ > " -noslide Do not allow pieces to \"slide\" after being dropped\n" > " with the spacebar.\n" > " -server Start the server instead of the client.\n" >+" -port <port> Use a specific port (default port is 31457).\n" > " -shadow Make the pieces cast shadow. Can speed up gameplay\n" > " considerably, but it can be considered as cheating by\n" > " some people since some other tetrinet clients lack this.\n" >@@ -557,6 +558,7 @@ > int init(int ac, char **av) > { > int i; >+ int port = 31457; > char *nick = NULL, *server = NULL; > char buf[1024]; > char nickmsg[1024]; >@@ -611,6 +613,14 @@ > cast_shadow = 0; > } else if (strcmp(av[i], "-fast") == 0) { > tetrifast = 1; >+ } else if (strcmp(av[i], "-port") == 0) { >+ if(av[++i] != '\0') { >+ port = atoi(av[i]); >+ if(port < 1 || port > 65535) { >+ fprintf(stderr, "Please choose a port in [1-65535] range.\n"); >+ return 1; >+ } >+ } > } else { > fprintf(stderr, "Unknown option %s\n", av[i]); > help(); >@@ -637,10 +647,10 @@ > } > if (strlen(nick) > 63) /* put a reasonable limit on nick length */ > nick[63] = 0; >- >- if ((server_sock = conn(server, 31457, ip)) < 0) { >- fprintf(stderr, "Couldn't connect to server %s: %s\n", >- server, strerror(errno)); >+ >+ if ((server_sock = conn(server, port, ip)) < 0) { >+ fprintf(stderr, "Couldn't connect to server %s on port %d : %s\n", >+ server, port, strerror(errno)); > return 1; > } > sprintf(nickmsg, "tetri%s %s 1.13", tetrifast ? "faster" : "sstart", nick);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238319
:
166027
|
166029
| 166030 |
166032