Browse Source

Maybe it will work now?

MissValeska 9 years ago
parent
commit
175f795a2b
1 changed files with 2 additions and 6 deletions
  1. 2
    6
      src/inet.c

+ 2
- 6
src/inet.c View File

1109
 			const struct sockaddr * to, socklen_t tolen)
1109
 			const struct sockaddr * to, socklen_t tolen)
1110
 {
1110
 {
1111
 	ssize_t err;
1111
 	ssize_t err;
1112
-	char *ipv4_addr;
1113
-        size_t maxlen;
1114
 	if ((err = sendto(s, msg, len, flags, to, tolen)) == -1) {
1112
 	if ((err = sendto(s, msg, len, flags, to, tolen)) == -1) {
1115
 		switch (errno) {
1113
 		switch (errno) {
1116
 		case EMSGSIZE:
1114
 		case EMSGSIZE:
1120
 			break;
1118
 			break;
1121
 		case EFAULT:
1119
 		case EFAULT:
1122
 			error("To Family is: %hu "
1120
 			error("To Family is: %hu "
1123
-                                "To Data is: %s "
1121
+                                "To Data is: %%pNP "
1124
                                 "and: %s", to->sa_family, 
1122
                                 "and: %s", to->sa_family, 
1125
-                                inet_ntop(to->sa_family,
1126
-                                &(((struct sockaddr_in*)to)->sin_addr),
1127
-                                ipv4_addr, maxlen),
1123
+                                to->sa_data,
1128
                                 strerror(errno));
1124
                                 strerror(errno));
1129
 		default:
1125
 		default:
1130
 			error("inet_sendto: Cannot send(): %s", strerror(errno));
1126
 			error("inet_sendto: Cannot send(): %s", strerror(errno));

Loading…
Cancel
Save