Fossil SCM
Fix source code formatting in winhttp.c.
Commit
9d8bdc90f9f15e4eec30b8a32a1bb5db91b288b6
Parent
f460839cff85d4e…
1 file changed
+10
-7
+10
-7
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -624,22 +624,22 @@ | ||
| 624 | 624 | /* Create the service. */ |
| 625 | 625 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 626 | 626 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 627 | 627 | hSvc = CreateServiceW( |
| 628 | 628 | hScm, /* Handle to the SCM */ |
| 629 | - fossil_utf8_to_unicode(zSvcName), /* Name of the service */ | |
| 630 | - fossil_utf8_to_unicode(zDisplay), /* Display name */ | |
| 629 | + fossil_utf8_to_unicode(zSvcName), /* Name of the service */ | |
| 630 | + fossil_utf8_to_unicode(zDisplay), /* Display name */ | |
| 631 | 631 | SERVICE_ALL_ACCESS, /* Desired access */ |
| 632 | 632 | SERVICE_WIN32_OWN_PROCESS, /* Service type */ |
| 633 | 633 | dwStartType, /* Start type */ |
| 634 | 634 | SERVICE_ERROR_NORMAL, /* Error control */ |
| 635 | 635 | fossil_utf8_to_unicode(blob_str(&binPath)), /* Binary path */ |
| 636 | 636 | NULL, /* Load ordering group */ |
| 637 | 637 | NULL, /* Tag value */ |
| 638 | 638 | NULL, /* Service dependencies */ |
| 639 | - fossil_utf8_to_unicode(zUsername), /* Service account */ | |
| 640 | - fossil_utf8_to_unicode(zPassword) /* Account password */ | |
| 639 | + fossil_utf8_to_unicode(zUsername), /* Service account */ | |
| 640 | + fossil_utf8_to_unicode(zPassword) /* Account password */ | |
| 641 | 641 | ); |
| 642 | 642 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 643 | 643 | /* Set the service description. */ |
| 644 | 644 | ChangeServiceConfig2W(hSvc, SERVICE_CONFIG_DESCRIPTION, &svcDescr); |
| 645 | 645 | fossil_print("Service '%s' successfully created.\n", zSvcName); |
| @@ -658,11 +658,12 @@ | ||
| 658 | 658 | }else if( g.argc>4 ){ |
| 659 | 659 | fossil_fatal("to much arguments for delete method."); |
| 660 | 660 | } |
| 661 | 661 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 662 | 662 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 663 | - hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); | |
| 663 | + hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), | |
| 664 | + SERVICE_ALL_ACCESS); | |
| 664 | 665 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 665 | 666 | QueryServiceStatus(hSvc, &sstat); |
| 666 | 667 | if( sstat.dwCurrentState!=SERVICE_STOPPED ){ |
| 667 | 668 | fossil_print("Stopping service '%s'", zSvcName); |
| 668 | 669 | if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){ |
| @@ -808,11 +809,12 @@ | ||
| 808 | 809 | }else if( g.argc>4 ){ |
| 809 | 810 | fossil_fatal("to much arguments for start method."); |
| 810 | 811 | } |
| 811 | 812 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 812 | 813 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 813 | - hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); | |
| 814 | + hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), | |
| 815 | + SERVICE_ALL_ACCESS); | |
| 814 | 816 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 815 | 817 | QueryServiceStatus(hSvc, &sstat); |
| 816 | 818 | if( sstat.dwCurrentState!=SERVICE_RUNNING ){ |
| 817 | 819 | fossil_print("Starting service '%s'", zSvcName); |
| 818 | 820 | if( sstat.dwCurrentState!=SERVICE_START_PENDING ){ |
| @@ -844,11 +846,12 @@ | ||
| 844 | 846 | }else if( g.argc>4 ){ |
| 845 | 847 | fossil_fatal("to much arguments for stop method."); |
| 846 | 848 | } |
| 847 | 849 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 848 | 850 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 849 | - hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); | |
| 851 | + hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), | |
| 852 | + SERVICE_ALL_ACCESS); | |
| 850 | 853 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 851 | 854 | QueryServiceStatus(hSvc, &sstat); |
| 852 | 855 | if( sstat.dwCurrentState!=SERVICE_STOPPED ){ |
| 853 | 856 | fossil_print("Stopping service '%s'", zSvcName); |
| 854 | 857 | if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){ |
| 855 | 858 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -624,22 +624,22 @@ | |
| 624 | /* Create the service. */ |
| 625 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 626 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 627 | hSvc = CreateServiceW( |
| 628 | hScm, /* Handle to the SCM */ |
| 629 | fossil_utf8_to_unicode(zSvcName), /* Name of the service */ |
| 630 | fossil_utf8_to_unicode(zDisplay), /* Display name */ |
| 631 | SERVICE_ALL_ACCESS, /* Desired access */ |
| 632 | SERVICE_WIN32_OWN_PROCESS, /* Service type */ |
| 633 | dwStartType, /* Start type */ |
| 634 | SERVICE_ERROR_NORMAL, /* Error control */ |
| 635 | fossil_utf8_to_unicode(blob_str(&binPath)), /* Binary path */ |
| 636 | NULL, /* Load ordering group */ |
| 637 | NULL, /* Tag value */ |
| 638 | NULL, /* Service dependencies */ |
| 639 | fossil_utf8_to_unicode(zUsername), /* Service account */ |
| 640 | fossil_utf8_to_unicode(zPassword) /* Account password */ |
| 641 | ); |
| 642 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 643 | /* Set the service description. */ |
| 644 | ChangeServiceConfig2W(hSvc, SERVICE_CONFIG_DESCRIPTION, &svcDescr); |
| 645 | fossil_print("Service '%s' successfully created.\n", zSvcName); |
| @@ -658,11 +658,12 @@ | |
| 658 | }else if( g.argc>4 ){ |
| 659 | fossil_fatal("to much arguments for delete method."); |
| 660 | } |
| 661 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 662 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 663 | hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); |
| 664 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 665 | QueryServiceStatus(hSvc, &sstat); |
| 666 | if( sstat.dwCurrentState!=SERVICE_STOPPED ){ |
| 667 | fossil_print("Stopping service '%s'", zSvcName); |
| 668 | if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){ |
| @@ -808,11 +809,12 @@ | |
| 808 | }else if( g.argc>4 ){ |
| 809 | fossil_fatal("to much arguments for start method."); |
| 810 | } |
| 811 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 812 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 813 | hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); |
| 814 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 815 | QueryServiceStatus(hSvc, &sstat); |
| 816 | if( sstat.dwCurrentState!=SERVICE_RUNNING ){ |
| 817 | fossil_print("Starting service '%s'", zSvcName); |
| 818 | if( sstat.dwCurrentState!=SERVICE_START_PENDING ){ |
| @@ -844,11 +846,12 @@ | |
| 844 | }else if( g.argc>4 ){ |
| 845 | fossil_fatal("to much arguments for stop method."); |
| 846 | } |
| 847 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 848 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 849 | hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), SERVICE_ALL_ACCESS); |
| 850 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 851 | QueryServiceStatus(hSvc, &sstat); |
| 852 | if( sstat.dwCurrentState!=SERVICE_STOPPED ){ |
| 853 | fossil_print("Stopping service '%s'", zSvcName); |
| 854 | if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){ |
| 855 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -624,22 +624,22 @@ | |
| 624 | /* Create the service. */ |
| 625 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 626 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 627 | hSvc = CreateServiceW( |
| 628 | hScm, /* Handle to the SCM */ |
| 629 | fossil_utf8_to_unicode(zSvcName), /* Name of the service */ |
| 630 | fossil_utf8_to_unicode(zDisplay), /* Display name */ |
| 631 | SERVICE_ALL_ACCESS, /* Desired access */ |
| 632 | SERVICE_WIN32_OWN_PROCESS, /* Service type */ |
| 633 | dwStartType, /* Start type */ |
| 634 | SERVICE_ERROR_NORMAL, /* Error control */ |
| 635 | fossil_utf8_to_unicode(blob_str(&binPath)), /* Binary path */ |
| 636 | NULL, /* Load ordering group */ |
| 637 | NULL, /* Tag value */ |
| 638 | NULL, /* Service dependencies */ |
| 639 | fossil_utf8_to_unicode(zUsername), /* Service account */ |
| 640 | fossil_utf8_to_unicode(zPassword) /* Account password */ |
| 641 | ); |
| 642 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 643 | /* Set the service description. */ |
| 644 | ChangeServiceConfig2W(hSvc, SERVICE_CONFIG_DESCRIPTION, &svcDescr); |
| 645 | fossil_print("Service '%s' successfully created.\n", zSvcName); |
| @@ -658,11 +658,12 @@ | |
| 658 | }else if( g.argc>4 ){ |
| 659 | fossil_fatal("to much arguments for delete method."); |
| 660 | } |
| 661 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 662 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 663 | hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), |
| 664 | SERVICE_ALL_ACCESS); |
| 665 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 666 | QueryServiceStatus(hSvc, &sstat); |
| 667 | if( sstat.dwCurrentState!=SERVICE_STOPPED ){ |
| 668 | fossil_print("Stopping service '%s'", zSvcName); |
| 669 | if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){ |
| @@ -808,11 +809,12 @@ | |
| 809 | }else if( g.argc>4 ){ |
| 810 | fossil_fatal("to much arguments for start method."); |
| 811 | } |
| 812 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 813 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 814 | hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), |
| 815 | SERVICE_ALL_ACCESS); |
| 816 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 817 | QueryServiceStatus(hSvc, &sstat); |
| 818 | if( sstat.dwCurrentState!=SERVICE_RUNNING ){ |
| 819 | fossil_print("Starting service '%s'", zSvcName); |
| 820 | if( sstat.dwCurrentState!=SERVICE_START_PENDING ){ |
| @@ -844,11 +846,12 @@ | |
| 846 | }else if( g.argc>4 ){ |
| 847 | fossil_fatal("to much arguments for stop method."); |
| 848 | } |
| 849 | hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_ALL_ACCESS); |
| 850 | if( !hScm ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 851 | hSvc = OpenServiceW(hScm, fossil_utf8_to_unicode(zSvcName), |
| 852 | SERVICE_ALL_ACCESS); |
| 853 | if( !hSvc ) fossil_fatal(zErrFmt, zSvcName, win32_get_last_errmsg()); |
| 854 | QueryServiceStatus(hSvc, &sstat); |
| 855 | if( sstat.dwCurrentState!=SERVICE_STOPPED ){ |
| 856 | fossil_print("Stopping service '%s'", zSvcName); |
| 857 | if( sstat.dwCurrentState!=SERVICE_STOP_PENDING ){ |
| 858 |