|
@@ -1245,11 +1245,15 @@ static int tftp_apply_settings ( void ) {
|
1245
|
1245
|
* applicators.
|
1246
|
1246
|
*/
|
1247
|
1247
|
if ( tftp_server.s_addr != last_tftp_server.s_addr ) {
|
1248
|
|
- snprintf ( uri_string, sizeof ( uri_string ),
|
1249
|
|
- "tftp://%s/", inet_ntoa ( tftp_server ) );
|
1250
|
|
- uri = parse_uri ( uri_string );
|
1251
|
|
- if ( ! uri )
|
1252
|
|
- return -ENOMEM;
|
|
1248
|
+ if ( tftp_server.s_addr ) {
|
|
1249
|
+ snprintf ( uri_string, sizeof ( uri_string ),
|
|
1250
|
+ "tftp://%s/", inet_ntoa ( tftp_server ) );
|
|
1251
|
+ uri = parse_uri ( uri_string );
|
|
1252
|
+ if ( ! uri )
|
|
1253
|
+ return -ENOMEM;
|
|
1254
|
+ } else {
|
|
1255
|
+ uri = NULL;
|
|
1256
|
+ }
|
1253
|
1257
|
churi ( uri );
|
1254
|
1258
|
uri_put ( uri );
|
1255
|
1259
|
}
|