Skip to content

Commit a1109f9

Browse files
committed
modify the return value of packet send function
1 parent 1c1c449 commit a1109f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

uinet/lib/packet_process.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,10 @@ int packet_sys_send(char *pkt, int len ,int port)
354354
printf("\n");
355355
}
356356
n = send(packet_fd, pkt, len, 0);
357-
return n;
357+
if(n == len)
358+
return 0;
359+
else
360+
return -1;
358361
}
359362

360363

0 commit comments

Comments
 (0)