Reads Cisco 1048 elements
FossilOrigin-Name: 862bfe7c8db943b9aada1de60f3c537ffe7fd0fc0f943d952c6a912ff9f53cdd
This commit is contained in:
@ -722,29 +722,3 @@ int cw_read_messages(struct conn *conn)
|
||||
return -1;
|
||||
}
|
||||
|
||||
int cw_read_from(struct conn *conn)
|
||||
{
|
||||
int n;
|
||||
struct sockaddr_storage from;
|
||||
uint8_t buf[2024];
|
||||
int len = 2024;
|
||||
|
||||
if (!conn->readfrom) {
|
||||
cw_log(LOG_ERR, "Fatal error, no readfrom method available.");
|
||||
errno = EPROTO;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
n = conn->readfrom(conn, buf, len, &from);
|
||||
if (n < 0)
|
||||
return n;
|
||||
|
||||
if (n > 0) {
|
||||
return conn->process_packet(conn, buf, n, (struct sockaddr *) &from);
|
||||
}
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user