Skip to content

Commit

Permalink
[usb-moded] Do not do post-sync after mode setting error.
Browse files Browse the repository at this point in the history
There is no point in running the post-sync if the mode setting failed.
So we skip it in that case (also makes sure that the services are not
active in the failure case)

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Jun 1, 2014
1 parent 7e13eca commit 43bc871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/usb_moded-modesetting.c
Expand Up @@ -445,7 +445,8 @@ int set_dynamic_mode(void)
if(data->nat || data->dhcp_server)
ret = usb_network_set_up_dhcpd(data);

if(data->appsync)
/* no need to execute the post sync if there was an error setting the mode */
if(data->appsync && !ret)
activate_sync_post(data->mode_name);

if(ret)
Expand Down

0 comments on commit 43bc871

Please sign in to comment.