astyle only

This commit is contained in:
laurent
2019-10-08 16:15:29 +02:00
parent 445cf84e94
commit 0b7489b122
22 changed files with 3705 additions and 3823 deletions
+2 -1
View File
@@ -430,8 +430,9 @@ static bool flushInput(rfsimulator_state_t *t, int timeout) {
b->circularBuf[(index*nbAnt+a)%CirSize].i=0;
}
}
if ( abs(b->th.timestamp-b->lastReceivedTS) > 50 )
LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS );
LOG_W(HW,"gap of: %ld in reception\n", b->th.timestamp-b->lastReceivedTS );
}
b->lastReceivedTS=b->th.timestamp;
+17 -12
View File
@@ -7,18 +7,21 @@
volatile int oai_exit = 0;
int fullread(int fd, void *_buf, int count)
{
int fullread(int fd, void *_buf, int count) {
char *buf = _buf;
int ret = 0;
int l;
while (count) {
l = read(fd, buf, count);
if (l <= 0) return -1;
count -= l;
buf += l;
ret += l;
}
return ret;
}
@@ -79,7 +82,6 @@ sin_addr:
while(!connected) {
//LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) {
//LOG_I(HW,"rfsimulator: connection established\n");
connected=true;
@@ -144,7 +146,8 @@ int main(int argc, char *argv[]) {
uint64_t wroteTS=header.timestamp;
if (dataSize>bufSize) {
void * new_buff = realloc(buff, dataSize);
void *new_buff = realloc(buff, dataSize);
if (new_buff == NULL) {
free(buff);
AssertFatal(1, "Could not reallocate");
@@ -157,15 +160,17 @@ int main(int argc, char *argv[]) {
fullwrite(serviceSock, buff, dataSize);
// Purge incoming samples
setblocking(serviceSock, blocking);
while(readTS < wroteTS) {
if ( fullread(serviceSock, &header,sizeof(header)) != sizeof(header) ||
fullread(serviceSock, buff, sizeof(int32_t)*header.size*header.nbAnt) !=
sizeof(int32_t)*header.size*header.nbAnt
) {
printf("error: %s\n", strerror(errno));
exit(1);
}
readTS=header.timestamp;
if ( fullread(serviceSock, &header,sizeof(header)) != sizeof(header) ||
fullread(serviceSock, buff, sizeof(int32_t)*header.size*header.nbAnt) !=
sizeof(int32_t)*header.size*header.nbAnt
) {
printf("error: %s\n", strerror(errno));
exit(1);
}
readTS=header.timestamp;
}
}
+624 -640
View File
File diff suppressed because it is too large Load Diff