| 519 { |
519 { |
| 520 PurpleBuddy *pb = NULL; |
520 PurpleBuddy *pb = NULL; |
| 521 struct sockaddr_in their_addr; /* connector's address information */ |
521 struct sockaddr_in their_addr; /* connector's address information */ |
| 522 socklen_t sin_size = sizeof(struct sockaddr); |
522 socklen_t sin_size = sizeof(struct sockaddr); |
| 523 int client_socket; |
523 int client_socket; |
| |
524 int flags; |
| 524 BonjourBuddy *bb; |
525 BonjourBuddy *bb; |
| 525 char *address_text = NULL; |
526 char *address_text = NULL; |
| 526 PurpleBuddyList *bl = purple_get_blist(); |
527 PurpleBuddyList *bl = purple_get_blist(); |
| 527 struct _check_buddy_by_address_t *cbba; |
528 struct _check_buddy_by_address_t *cbba; |
| 528 |
529 |
| 531 return; |
532 return; |
| 532 |
533 |
| 533 if ((client_socket = accept(server_socket, (struct sockaddr *)&their_addr, &sin_size)) == -1) |
534 if ((client_socket = accept(server_socket, (struct sockaddr *)&their_addr, &sin_size)) == -1) |
| 534 return; |
535 return; |
| 535 |
536 |
| 536 fcntl(client_socket, F_SETFL, O_NONBLOCK); |
537 flags = fcntl(client_socket, F_GETFL); |
| |
538 fcntl(client_socket, F_SETFL, flags | O_NONBLOCK); |
| 537 |
539 |
| 538 /* Look for the buddy that has opened the conversation and fill information */ |
540 /* Look for the buddy that has opened the conversation and fill information */ |
| 539 address_text = inet_ntoa(their_addr.sin_addr); |
541 address_text = inet_ntoa(their_addr.sin_addr); |
| 540 purple_debug_info("bonjour", "Received incoming connection from %s.\n", address_text); |
542 purple_debug_info("bonjour", "Received incoming connection from %s.\n", address_text); |
| 541 cbba = g_new0(struct _check_buddy_by_address_t, 1); |
543 cbba = g_new0(struct _check_buddy_by_address_t, 1); |