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) ...@@ -43,13 +43,12 @@ int main(int argc, char **argv)
ppi->net_path = calloc(1, sizeof(*ppi->net_path)); ppi->net_path = calloc(1, sizeof(*ppi->net_path));
ppi->servo = calloc(1, sizeof(*ppi->servo)); ppi->servo = calloc(1, sizeof(*ppi->servo));
ppi->buf_out = calloc(1, PP_PACKET_SIZE); 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->frgn_master = calloc(1, sizeof(*ppi->frgn_master));
ppi->arch_data = calloc(1, sizeof(struct posix_arch_data)); ppi->arch_data = calloc(1, sizeof(struct posix_arch_data));
if ((!ppi->defaultDS) || (!ppi->currentDS) || (!ppi->parentDS) if ((!ppi->defaultDS) || (!ppi->currentDS) || (!ppi->parentDS)
|| (!ppi->portDS) || (!ppi->timePropertiesDS) || (!ppi->sent_seq_id) || (!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) || (!ppi->frgn_master) || (!ppi->arch_data)
) )
exit(__LINE__); exit(__LINE__);
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
#include <pptp/diag.h> #include <pptp/diag.h>
#include "posix.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 * A SIGALARM timer was called once a second, increasing the counter of elapsed
* time. * time.
* I find it easier to check for the timestamp when needed. The granularity of * 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. * this timer is the same as the ptpd solution: 1 second.
* Should be checked if this is enough, but I guess yes. * Should be checked if this is enough, but I guess yes.
* Maybe a certain SIGALARM timer solution must be re-introduced, because the * 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) int posix_timer_init(struct pp_instance *ppi)
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#include <stdint.h> #include <stdint.h>
typedef enum {FALSE=0, TRUE} Boolean; /* FIXME really needed? */ typedef enum {FALSE=0, TRUE} Boolean;
typedef uint8_t Octet; typedef uint8_t Octet;
typedef int8_t Integer8; typedef int8_t Integer8;
typedef int16_t Integer16; typedef int16_t Integer16;
......
...@@ -54,13 +54,6 @@ struct pp_runtime_opts { ...@@ -54,13 +54,6 @@ struct pp_runtime_opts {
UInteger8 domain_number; UInteger8 domain_number;
char *iface_name; char *iface_name;
void *arch_opts; 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 */ extern struct pp_runtime_opts default_rt_opts; /* preinited with defaults */
...@@ -153,7 +146,7 @@ struct pp_servo { ...@@ -153,7 +146,7 @@ struct pp_servo {
struct pp_net_path { struct pp_net_path {
struct pp_channel ch[2]; /* event and general channel (see above struct pp_channel ch[2]; /* event and general channel (see above
* #define's */ * #define's */
/* FIXME now unused, check it Integer32 ucast_addr;*/ /* FIXME check if useful Integer32 ucast_addr;*/
Integer32 mcast_addr; Integer32 mcast_addr;
Integer32 peer_mcast_addr; Integer32 peer_mcast_addr;
}; };
...@@ -178,7 +171,6 @@ struct pp_instance { ...@@ -178,7 +171,6 @@ struct pp_instance {
DSTimeProperties *timePropertiesDS; DSTimeProperties *timePropertiesDS;
struct pp_timer *timers[PP_TIMER_ARRAY_SIZE]; struct pp_timer *timers[PP_TIMER_ARRAY_SIZE];
/* FIXME: check the variables from now on. Now inherited from ptpd src*/
UInteger16 number_foreign_records; UInteger16 number_foreign_records;
Integer16 max_foreign_records; Integer16 max_foreign_records;
Integer16 foreign_record_i; Integer16 foreign_record_i;
...@@ -186,7 +178,6 @@ struct pp_instance { ...@@ -186,7 +178,6 @@ struct pp_instance {
Boolean record_update; Boolean record_update;
struct pp_frgn_master *frgn_master; struct pp_frgn_master *frgn_master;
Octet *buf_out; Octet *buf_out;
Octet *buf_in; /* FIXME really useful? Probably not*/
TimeInternal sync_receive_time; TimeInternal sync_receive_time;
UInteger16 recv_sync_sequence_id; UInteger16 recv_sync_sequence_id;
......
...@@ -5,4 +5,4 @@ ...@@ -5,4 +5,4 @@
#include <pptp/pptp.h> #include <pptp/pptp.h>
/* This is a placeholder for white rabbit extension. */ /* 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