|
|
@ -251,7 +251,7 @@ int main(int argc, char **argv) |
|
|
|
//rval = sendto(s, "chargen data\r\n", 14, 0, sa, len);
|
|
|
|
//rval = sendto(s, "chargen data\r\n", 14, 0, sa, len);
|
|
|
|
char character[512]; |
|
|
|
char character[512]; |
|
|
|
genChar(character); |
|
|
|
genChar(character); |
|
|
|
rval = sendto(s, character, 512, 0, sa, len); |
|
|
|
rval = sendto(s, character, strnlen(character,512), 0, sa, len); |
|
|
|
if (rval == -1) |
|
|
|
if (rval == -1) |
|
|
|
warn("sendto"); |
|
|
|
warn("sendto"); |
|
|
|
} |
|
|
|
} |
|
|
@ -288,7 +288,7 @@ int main(int argc, char **argv) |
|
|
|
} |
|
|
|
} |
|
|
|
char character[512]; |
|
|
|
char character[512]; |
|
|
|
genChar(character); |
|
|
|
genChar(character); |
|
|
|
if (write(s, character, 512) == -1) |
|
|
|
if (write(s, character, strnlen(character,512)) == -1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
warn("write"); |
|
|
|
warn("write"); |
|
|
|
printf("Closing stream connection\n"); |
|
|
|
printf("Closing stream connection\n"); |
|
|
|