@@ -217,8 +217,8 @@ int main(int argc, char *argv[]) {
217
217
}
218
218
219
219
struct tr_socket tr_sock ;
220
- struct tr_tcp_config * tcp_config ;
221
- struct tr_ssh_config * ssh_config ;
220
+ struct tr_tcp_config * tcp_config ;
221
+ struct tr_ssh_config * ssh_config ;
222
222
223
223
// Try to connect to the RTR server depending on the requested connection
224
224
// type.
@@ -241,27 +241,27 @@ int main(int argc, char *argv[]) {
241
241
}
242
242
243
243
struct rtr_socket rtr ;
244
- struct rtr_mgr_config * conf ;
245
- struct rtr_mgr_group groups [1 ];
244
+ struct rtr_mgr_config * conf ;
245
+ struct rtr_mgr_group groups [1 ];
246
246
247
- rtr .tr_socket = & tr_sock ;
248
- groups [0 ].sockets_len = 1 ;
249
- groups [0 ].sockets = malloc (1 * sizeof (rtr ));
250
- groups [0 ].sockets [0 ] = & rtr ;
251
- groups [0 ].preference = 1 ;
247
+ rtr .tr_socket = & tr_sock ;
248
+ groups [0 ].sockets_len = 1 ;
249
+ groups [0 ].sockets = malloc (1 * sizeof (rtr ));
250
+ groups [0 ].sockets [0 ] = & rtr ;
251
+ groups [0 ].preference = 1 ;
252
252
253
- int ret = rtr_mgr_init (& conf , groups , 1 , 240 , 520 , 600 ,
253
+ int ret = rtr_mgr_init (& conf , groups , 1 , 30 , 600 , 600 ,
254
254
pfx_update_callback , NULL , NULL , NULL );
255
255
256
- if (ret == RTR_ERROR )
257
- printf ("Error in rtr_mgr_init!\n" );
258
- else if (ret == RTR_INVALID_PARAM )
259
- printf ("Invalid params passed to rtr_mgr_init\n" );
256
+ if (ret == RTR_ERROR )
257
+ printf ("Error in rtr_mgr_init!\n" );
258
+ else if (ret == RTR_INVALID_PARAM )
259
+ printf ("Invalid params passed to rtr_mgr_init\n" );
260
260
261
- if (!conf )
262
- return EXIT_FAILURE ;
261
+ if (!conf )
262
+ return EXIT_FAILURE ;
263
263
264
- rtr_mgr_start (conf );
264
+ rtr_mgr_start (conf );
265
265
266
266
// Server loop. Read commands from stdin.
267
267
while (getline (& command , & command_len , stdin ) != -1 ) {
@@ -271,8 +271,8 @@ int main(int argc, char *argv[]) {
271
271
272
272
// Clean up RTRLIB memory.
273
273
rtr_mgr_stop (conf );
274
- rtr_mgr_free (conf );
275
- free (groups [0 ].sockets );
274
+ rtr_mgr_free (conf );
275
+ free (groups [0 ].sockets );
276
276
277
277
// Close BIRD socket.
278
278
close (bird_socket );
0 commit comments