Commit 8d93cedb authored by Aurelio Colosimo's avatar Aurelio Colosimo

trivial: rewritten (or deleted) some comments, removed useless variables

parent ff6adeda
......@@ -43,13 +43,12 @@ int main(int argc, char **argv)
ppi->net_path = calloc(1, sizeof(*ppi->net_path));
ppi->servo = calloc(1, sizeof(*ppi->servo));
ppi->buf_out = calloc(1, PP_PACKET_SIZE);
ppi->buf_in = calloc(1, PP_PACKET_SIZE);
ppi->frgn_master = calloc(1, sizeof(*ppi->frgn_master));
ppi->arch_data = calloc(1, sizeof(struct posix_arch_data));
if ((!ppi->defaultDS) || (!ppi->currentDS) || (!ppi->parentDS)
|| (!ppi->portDS) || (!ppi->timePropertiesDS) || (!ppi->sent_seq_id)
|| (!ppi->net_path) || (!ppi->buf_out) || (!ppi->buf_in)
|| (!ppi->net_path) || (!ppi->buf_out)
|| (!ppi->frgn_master) || (!ppi->arch_data)
)
exit(__LINE__);
......
......@@ -12,15 +12,15 @@
#include <pptp/diag.h>
#include "posix.h"
/* FIXME
* In ptpd-2.1.0/src/dep/timer.c the mechanism was different.
/* In ptpd-2.1.0/src/dep/timer.c the mechanism was different.
* A SIGALARM timer was called once a second, increasing the counter of elapsed
* time.
* I find it easier to check for the timestamp when needed. The granularity of
* this timer is the same as the ptpd solution: 1 second.
* Should be checked if this is enough, but I guess yes.
* Maybe a certain SIGALARM timer solution must be re-introduced, because the
* select in the main loop must exit when a timer elapses. To be checked
* select in the main loop must exit when a timer elapses. To be tested and
* checked
*/
int posix_timer_init(struct pp_instance *ppi)
......
......@@ -9,7 +9,7 @@
#include <stdint.h>
typedef enum {FALSE=0, TRUE} Boolean; /* FIXME really needed? */
typedef enum {FALSE=0, TRUE} Boolean;
typedef uint8_t Octet;
typedef int8_t Integer8;
typedef int16_t Integer16;
......
......@@ -54,13 +54,6 @@ struct pp_runtime_opts {
UInteger8 domain_number;
char *iface_name;
void *arch_opts;
/*TODO ARCH: arch_opts, for arch-gnu-linux, might include the following:
* int log_fd;
* char *record_file; [PP_PATH_MAX]
* FILE *record_fp;
* char *file; [PP_PATH_MAX]
*/
};
extern struct pp_runtime_opts default_rt_opts; /* preinited with defaults */
......@@ -153,7 +146,7 @@ struct pp_servo {
struct pp_net_path {
struct pp_channel ch[2]; /* event and general channel (see above
* #define's */
/* FIXME now unused, check it Integer32 ucast_addr;*/
/* FIXME check if useful Integer32 ucast_addr;*/
Integer32 mcast_addr;
Integer32 peer_mcast_addr;
};
......@@ -178,7 +171,6 @@ struct pp_instance {
DSTimeProperties *timePropertiesDS;
struct pp_timer *timers[PP_TIMER_ARRAY_SIZE];
/* FIXME: check the variables from now on. Now inherited from ptpd src*/
UInteger16 number_foreign_records;
Integer16 max_foreign_records;
Integer16 foreign_record_i;
......@@ -186,7 +178,6 @@ struct pp_instance {
Boolean record_update;
struct pp_frgn_master *frgn_master;
Octet *buf_out;
Octet *buf_in; /* FIXME really useful? Probably not*/
TimeInternal sync_receive_time;
UInteger16 recv_sync_sequence_id;
......
......@@ -5,4 +5,4 @@
#include <pptp/pptp.h>
/* This is a placeholder for white rabbit extension. */
/* TODO */
/* TODO extension white rabbit*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment