Merge branch 'master' of ssh://bitsetter.de:8090/netsl

This commit is contained in:
tkarrass 2013-11-02 22:30:40 +01:00
commit aeabe2ed3c
4 changed files with 4 additions and 3 deletions

View File

@ -57,7 +57,7 @@ void callback(const struct message *msg, const struct prog_info *pinfo) {
//int init = 0;
//int rows;
//int rows;
//int cols;
void prntscreen(const struct message *msg, const struct prog_info *pinfo) {
static int init = 0;

View File

@ -93,6 +93,7 @@ int main(int argc, char **argv) {
ret = run_server(&prog_info);
} else {
printf("running in CLIENT mode, using client number %d\n", prog_info.client_offset);
signal(SIGINT,&cleanup_display);
ret = run_client(&prog_info, callback);
}

View File

@ -152,7 +152,7 @@ int run_client(const struct prog_info *pinfo, void (*framecallback)(const struct
printf("check!\n");
freeaddrinfo(servinfo); // free whole list
struct sockaddr_storage their_addr;
socklen_t addr_len = sizeof their_addr;
int numbytes;

View File

@ -4,7 +4,7 @@
#include <sys/socket.h> // struct sockaddr
#include "misc.h" // prog_info
#include "msg.h" // message serialization
#include "display.h" // callback
#include "display.h" // callback
void *get_in_addr(struct sockaddr *sa);
int run_server(const struct prog_info *pinfo);